HID: cp2112: fix broken gpio_direction_input callback
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Fri, 10 Nov 2017 09:01:43 +0000 (10:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:22 +0000 (10:10 +0100)
commitdba1ca0e9a6fc57703eaa3c8d7293b8efc72c2af
tree3d29720323493b15088575b982aa43784a300e6f
parentb3e3728ed55b9ddd7b1600ebad11f16aa665dfcb
HID: cp2112: fix broken gpio_direction_input callback

[ Upstream commit 7da85fbf1c87d4f73621e0e7666a3387497075a9 ]

When everything goes smoothly, ret is set to 0 which makes the function
to return EIO error.

Fixes: 8e9faa15469e ("HID: cp2112: fix gpio-callback error handling")
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-cp2112.c