From: Alexey Khoroshilov Date: Wed, 15 Aug 2012 19:31:45 +0000 (+0400) Subject: HID: hidraw: improve error handling in hidraw_init() X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~104^2~1^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcb4a75bde3821cecb17a71d287abfd6ef9bd68d;p=pandora-kernel.git HID: hidraw: improve error handling in hidraw_init() Several improvements in error handling: - do not report success if alloc_chrdev_region() failed - check for error code of cdev_add() - use unregister_chrdev_region() instead of unregister_chrdev() if class_create() failed Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed