From: Jiri Kosina Date: Wed, 10 Aug 2011 12:02:59 +0000 (+0200) Subject: HID: propagate return value correctly in hid_input_report() X-Git-Tag: firefly_0821_release~3680^2~4331^2^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=45dc1ac73d28b3adb5819818785e758b1f369b74;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Jiri Kosina --- 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);