HID: alps: Check errors returned by 't4_read_write_register()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 19 Mar 2018 20:53:28 +0000 (21:53 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 26 Apr 2018 12:33:35 +0000 (14:33 +0200)
commit69934012f394d1db11c3c0c781fd88b6ae447dbe
treedfbd70cd8a310020bfd04c3b1f05d03fba34f8cc
parentedb6cb3d7c9026d1a3bdfde9f74ed6c807285206
HID: alps: Check errors returned by 't4_read_write_register()'

If only the first 't4_read_write_register()' call fails, the error code
will be overwritten and lost.
Directly report the error instead.

While at it, log some errors if 't4_read_write_register()' fails, as done
in the rest of the driver.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-alps.c