diff mbox

Input: silead - remove some dead code

Message ID 20160804052859.GI775@mwanda (mailing list archive)
State Accepted
Headers show

Commit Message

Dan Carpenter Aug. 4, 2016, 5:28 a.m. UTC
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>

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Torokhov Aug. 4, 2016, 3:25 p.m. UTC | #1
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);
diff mbox

Patch

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);