Skip to contentSkip to conversation

Input: silead - remove some dead code

PATCH Applied Dan Carpenter 2 participants 2 messages Aug 4, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: silead - remove some dead code

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.

drivers/input/touchscreen/silead.c +0 -3
index 5f55167..7379fe1 100644
@@ -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);
maintainer Applied
#1 lore raw
Quoted 4 lines · Dan Carpenter

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.

Applied, thank you.

Quoted 15 lines
drivers/input/touchscreen/silead.c +0 -3
index 5f55167..7379fe1 100644
@@ -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);
Signature · 1 line
Dmitry