diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-08-10 14:02:59 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-08-10 14:02:59 +0200 |
commit | 45dc1ac73d28b3adb5819818785e758b1f369b74 (patch) | |
tree | c4a7793c7c342fef92472bc89cd5c015135bc9b5 /drivers/hid | |
parent | 4ea5454203d991ec85264f64f89ca8855fce69b0 (diff) | |
download | blackbird-op-linux-45dc1ac73d28b3adb5819818785e758b1f369b74.tar.gz blackbird-op-linux-45dc1ac73d28b3adb5819818785e758b1f369b74.zip |
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f9cff9335595..bf1f74041dc3 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -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); |