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: NAlexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
Showing
想要评论请 注册 或 登录