summaryrefslogtreecommitdiff
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-08-07 01:35:34 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-08-07 03:33:43 +0300
commitea38f06e0291986eb93beb6d61fd413607a30ca4 (patch)
treeb62a4a50cd783ee6d24091ba427f36a6b531ccb4 /drivers/input/mouse
parent47fcd0f969e98c4a82a12efb956c6f8d39aa918a (diff)
downloadlinux-ea38f06e0291986eb93beb6d61fd413607a30ca4.tar.xz
Input: sentelic - fix error return when fsp_reg_write fails
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>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/sentelic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c
index 9f7ecc72093a..2716d2ba386a 100644
--- a/drivers/input/mouse/sentelic.c
+++ b/drivers/input/mouse/sentelic.c
@@ -441,7 +441,7 @@ static ssize_t fsp_attr_set_setreg(struct psmouse *psmouse, void *data,
fsp_reg_write_enable(psmouse, false);
- return count;
+ return retval;
}
PSMOUSE_DEFINE_WO_ATTR(setreg, S_IWUSR, NULL, fsp_attr_set_setreg);