* [PATCH] input: sentelic: fix error return when fsp_reg_write fails
@ 2020-06-03 14:12 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-06-03 14:12 UTC (permalink / raw)
To: Dmitry Torokhov, Tai-hwa Liang, linux-input, linux-kernel; +Cc: kernel-janitors
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/input/mouse/sentelic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c
index e99d9bf1a267..e78c4c7eda34 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);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] input: sentelic: fix error return when fsp_reg_write fails
@ 2020-06-03 14:12 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-06-03 14:12 UTC (permalink / raw)
To: Dmitry Torokhov, Tai-hwa Liang, linux-input, linux-kernel; +Cc: kernel-janitors
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/input/mouse/sentelic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c
index e99d9bf1a267..e78c4c7eda34 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);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] input: sentelic: fix error return when fsp_reg_write fails
2020-06-03 14:12 ` Colin King
@ 2020-08-06 22:36 ` Dmitry Torokhov
-1 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2020-08-06 22:36 UTC (permalink / raw)
To: Colin King; +Cc: Tai-hwa Liang, linux-input, linux-kernel, kernel-janitors
On Wed, Jun 03, 2020 at 03:12:18PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] input: sentelic: fix error return when fsp_reg_write fails
@ 2020-08-06 22:36 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2020-08-06 22:36 UTC (permalink / raw)
To: Colin King; +Cc: Tai-hwa Liang, linux-input, linux-kernel, kernel-janitors
On Wed, Jun 03, 2020 at 03:12:18PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-06 22:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 14:12 [PATCH] input: sentelic: fix error return when fsp_reg_write fails Colin King
2020-06-03 14:12 ` Colin King
2020-08-06 22:36 ` Dmitry Torokhov
2020-08-06 22:36 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.