HID: usbhid: fix improper return value
authorPan Bian <bianpan2016@163.com>
Mon, 5 Dec 2016 11:37:24 +0000 (19:37 +0800)
committerJiri Kosina <jkosina@suse.cz>
Fri, 9 Dec 2016 12:46:29 +0000 (13:46 +0100)
commitc60fa555b11b25386b355c141d90cbee361c3eec
tree144f457fbc9ebfcb02a4c98a4009fd0f3b402d62
parent2ae3986b84e9d325bc92a1efbcf0c6b0f5016b35
HID: usbhid: fix improper return value

Function hid_post_reset() should return negative error codes on failures.
However, in its implementation, it incorrectly returns 1.  This patch fixes the
bug, returning proper error codes on failures.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c