HID: hiddev: Return specific error codes on connect failure
authorJason Gerecke <killertofu@gmail.com>
Thu, 11 Feb 2021 19:30:59 +0000 (11:30 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 8 Mar 2021 10:12:22 +0000 (11:12 +0100)
commit9951bb259dd0794db39beb63899104da9579efcc
treee7c7f8575d376b42a53ae2b240a2b18091d88fbf
parent69aea9d2843669387d100e353b5113d1adc9502f
HID: hiddev: Return specific error codes on connect failure

The only caller of this function only cares about gross success/failure
but we still might as well resolve the following smatch warning and fix
the other error paths as well:

    hiddev.c:894 hiddev_connect() warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hiddev.c