From: Akinobu Mita Date: Tue, 8 May 2007 07:29:18 +0000 (-0700) Subject: dtlk: fix error checks in module_init() X-Git-Tag: v2.6.22-rc1~671 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2bbe383ef7e792e92a5f53be955e71bd253ab32;p=pandora-kernel.git 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 Cc: Chris Pallotta Cc: Jim Van Zandt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed