diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2012-08-15 23:31:45 +0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-10-10 03:31:17 +0100 |
commit | 3084fc2f2e8cf84b1d0a66323c26943d5ca98860 (patch) | |
tree | c90c9d82b324ea0292f82f8bc275c7c49cebb069 /scripts/tracing | |
parent | 3313aa9015c7c868a9bcdb7b1c143719d2873a66 (diff) |
HID: hidraw: improve error handling in hidraw_init()
commit bcb4a75bde3821cecb17a71d287abfd6ef9bd68d upstream.
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 <khoroshilov@ispras.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts/tracing')
0 files changed, 0 insertions, 0 deletions