Skip to content

Commit

Permalink
Input: sentelic - fix error return when fsp_reg_write fails
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1892774

[ Upstream commit ea38f06 ]

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: fc69f4a ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
  • Loading branch information
Colin Ian King authored and kamalmostafa committed Aug 24, 2020
1 parent 9d9ce28 commit 12b1492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/mouse/sentelic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 12b1492

Please sign in to comment.