* [patch] Input: silead - remove some dead code
@ 2016-08-04 5:28 Dan Carpenter
2016-08-04 15:25 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-08-04 5:28 UTC (permalink / raw)
To: Dmitry Torokhov, Robert Dolca
Cc: Henrik Rydberg, Hans de Goede, Daniel Jansen, linux-input,
kernel-janitors
buf[0] is an unsigned char. touch_nr is an int. The test for negative
here doesn't make sense so I have removed it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
index 5f55167..7379fe1 100644
--- a/drivers/input/touchscreen/silead.c
+++ b/drivers/input/touchscreen/silead.c
@@ -147,9 +147,6 @@ static void silead_ts_read_data(struct i2c_client *client)
}
touch_nr = buf[0];
- if (touch_nr < 0)
- return;
-
if (touch_nr > data->max_fingers) {
dev_warn(dev, "More touches reported then supported %d > %d\n",
touch_nr, data->max_fingers);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] Input: silead - remove some dead code
2016-08-04 5:28 [patch] Input: silead - remove some dead code Dan Carpenter
@ 2016-08-04 15:25 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2016-08-04 15:25 UTC (permalink / raw)
To: Dan Carpenter
Cc: Robert Dolca, Henrik Rydberg, Hans de Goede, Daniel Jansen,
linux-input, kernel-janitors
On Thu, Aug 04, 2016 at 08:28:59AM +0300, Dan Carpenter wrote:
> buf[0] is an unsigned char. touch_nr is an int. The test for negative
> here doesn't make sense so I have removed it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thank you.
>
> diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
> index 5f55167..7379fe1 100644
> --- a/drivers/input/touchscreen/silead.c
> +++ b/drivers/input/touchscreen/silead.c
> @@ -147,9 +147,6 @@ static void silead_ts_read_data(struct i2c_client *client)
> }
>
> touch_nr = buf[0];
> - if (touch_nr < 0)
> - return;
> -
> if (touch_nr > data->max_fingers) {
> dev_warn(dev, "More touches reported then supported %d > %d\n",
> touch_nr, data->max_fingers);
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-04 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 5:28 [patch] Input: silead - remove some dead code Dan Carpenter
2016-08-04 15:25 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).