diff options
Diffstat (limited to 'drivers/input/misc/pcf8574_keypad.c')
| -rw-r--r-- | drivers/input/misc/pcf8574_keypad.c | 4 | 
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/input/misc/pcf8574_keypad.c b/drivers/input/misc/pcf8574_keypad.c index 5c3ac4e0b05..4b42ffc0532 100644 --- a/drivers/input/misc/pcf8574_keypad.c +++ b/drivers/input/misc/pcf8574_keypad.c @@ -69,7 +69,7 @@ static irqreturn_t pcf8574_kp_irq_handler(int irq, void *dev_id)  	unsigned char nextstate = read_state(lp);  	if (lp->laststate != nextstate) { -		int key_down = nextstate <= ARRAY_SIZE(lp->btncode); +		int key_down = nextstate < ARRAY_SIZE(lp->btncode);  		unsigned short keycode = key_down ?  			lp->btncode[nextstate] : lp->btncode[lp->laststate]; @@ -168,8 +168,6 @@ static int __devexit pcf8574_kp_remove(struct i2c_client *client)  	input_unregister_device(lp->idev);  	kfree(lp); -	i2c_set_clientdata(client, NULL); -  	return 0;  }  |