Input: sentelic - fix error return when fsp_reg_write fails
authorColin Ian King <colin.king@canonical.com>
Thu, 6 Aug 2020 22:35:34 +0000 (15:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:15:16 +0000 (13:15 +0200)
commite29f7f9a79082c1a645258369e66098b1af74f98
tree694b0ed603b8007c4a65b9369f85ff31c2579c81
parent3396572c3b6298a643d375668d573747911997f8
Input: sentelic - fix error return when fsp_reg_write fails

[ Upstream commit ea38f06e0291986eb93beb6d61fd413607a30ca4 ]

Currently when the call to fsp_reg_write fails -EIO is not being returned
because the count is being returned instead of the return value in retval.
Fix this by returning the value in retval instead of count.

Addresses-Coverity: ("Unused value")
Fixes: fc69f4a6af49 ("Input: add new driver for Sentelic Finger Sensing Pad")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200603141218.131663-1-colin.king@canonical.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/mouse/sentelic.c