Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Dmitry Torokhov
ea38f06e 47fcd0f9

+1 -1
+1 -1
drivers/input/mouse/sentelic.c
··· 441 441 442 442 fsp_reg_write_enable(psmouse, false); 443 443 444 - return count; 444 + return retval; 445 445 } 446 446 447 447 PSMOUSE_DEFINE_WO_ATTR(setreg, S_IWUSR, NULL, fsp_attr_set_setreg);