Skip to content

Commit

Permalink
Input: tnetv107x-keypad - make irqs signed for error handling
Browse files Browse the repository at this point in the history
There is a bug in keypad_probe() where we do:

	kp->irq_press   = platform_get_irq_byname(pdev, "press");
	kp->irq_release = platform_get_irq_byname(pdev, "release");
	if (kp->irq_press < 0 || kp->irq_release < 0) {

The problem is that these irq variables are unsigned so the error
handling doesn't work.  I've changed them to signed values.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Dan Carpenter authored and Dmitry Torokhov committed Nov 11, 2013
1 parent c6d81bd commit a108193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/keyboard/tnetv107x-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ struct keypad_data {
struct clk *clk;
struct device *dev;
spinlock_t lock;
u32 irq_press;
u32 irq_release;
int irq_press;
int irq_release;
int rows, cols, row_shift;
int debounce_ms, active_low;
u32 prev_keys[3];
Expand Down

0 comments on commit a108193

Please sign in to comment.