Akinobu Mita b2bbe383ef dtlk: fix error checks in module_init()
This patch fixes two things in module_init.

- fix register_chrdev() error check

  Currently dtlk doesn't check register_chrdev() failure correctly.
  register_chrdev() returns a errno on failure.

- check probe failure

  dtlk ignores probe failure and allows the module loading without
  such device. I got "Trying to free nonexistent resource" message
  by release_region() when unloading module without device.

[akpm@linux-foundation.org: fix error code return]
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chris Pallotta <chris@allmedia.com>
Cc: Jim Van Zandt <jrv@vanzandt.mv.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:09 -07:00
..
2007-02-17 18:57:09 +01:00
2007-05-08 11:15:03 -07:00
2006-12-07 08:39:41 -08:00
2007-05-08 11:15:09 -07:00
2006-10-04 07:55:13 -07:00
2006-12-08 08:28:57 -08:00
2006-11-22 14:57:56 +00:00
2006-12-08 08:28:57 -08:00
2007-02-11 10:51:26 -08:00
2007-02-11 10:51:26 -08:00
2007-03-17 01:03:26 +00:00
2007-02-20 17:11:55 +00:00
2007-05-07 12:13:04 -07:00
2007-02-11 10:51:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-11 10:51:26 -08:00
2007-05-08 11:15:04 -07:00
2006-09-29 09:18:12 -07:00
2007-02-11 10:51:28 -08:00
2007-02-12 09:48:30 -08:00
2006-12-13 09:05:49 -08:00
2006-12-08 08:28:59 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-05-08 11:15:05 -07:00
2006-12-20 16:37:48 +11:00