diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-08-10 08:02:59 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-08-10 08:02:59 -0400 |
commit | 45dc1ac73d28b3adb5819818785e758b1f369b74 (patch) | |
tree | c4a7793c7c342fef92472bc89cd5c015135bc9b5 | |
parent | 4ea5454203d991ec85264f64f89ca8855fce69b0 (diff) |
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>
-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 | |||
1086 | struct hid_report *report; | 1086 | struct hid_report *report; |
1087 | char *buf; | 1087 | char *buf; |
1088 | unsigned int i; | 1088 | unsigned int i; |
1089 | int ret; | 1089 | int ret = 0; |
1090 | 1090 | ||
1091 | if (!hid) | 1091 | if (!hid) |
1092 | return -ENODEV; | 1092 | return -ENODEV; |
@@ -1145,7 +1145,7 @@ nomem: | |||
1145 | 1145 | ||
1146 | unlock: | 1146 | unlock: |
1147 | up(&hid->driver_lock); | 1147 | up(&hid->driver_lock); |
1148 | return 0; | 1148 | return ret; |
1149 | } | 1149 | } |
1150 | EXPORT_SYMBOL_GPL(hid_input_report); | 1150 | EXPORT_SYMBOL_GPL(hid_input_report); |
1151 | 1151 | ||