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>