1
0
Fork 0

HID: propagate return value correctly in hid_input_report()

Fix a return value propagation that was omitted in David Herrmann's
locking fix around hid_input_report().

Reported-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hifive-unleashed-5.1
Jiri Kosina 2011-08-10 14:02:59 +02:00
parent 4ea5454203
commit 45dc1ac73d
1 changed files with 2 additions and 2 deletions

View File

@ -1086,7 +1086,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
struct hid_report *report;
char *buf;
unsigned int i;
int ret;
int ret = 0;
if (!hid)
return -ENODEV;
@ -1145,7 +1145,7 @@ nomem:
unlock:
up(&hid->driver_lock);
return 0;
return ret;
}
EXPORT_SYMBOL_GPL(hid_input_report);