Skip to content

Commit

Permalink
HID: propagate return value correctly in hid_input_report()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina committed Aug 10, 2011
1 parent 4ea5454 commit 45dc1ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1145,7 +1145,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i

unlock:
up(&hid->driver_lock);
return 0;
return ret;
}
EXPORT_SYMBOL_GPL(hid_input_report);

Expand Down

0 comments on commit 45dc1ac

Please sign in to comment.