From a108193cf9685061660e111f985594d6a344abfb Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sun, 10 Nov 2013 23:31:17 -0800 Subject: Input: tnetv107x-keypad - make irqs signed for error handling 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 Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/tnetv107x-keypad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input/keyboard') diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c index 5f7b427dd7ed..8bd24d52bf1b 100644 --- a/drivers/input/keyboard/tnetv107x-keypad.c +++ b/drivers/input/keyboard/tnetv107x-keypad.c @@ -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]; -- cgit v1.2.3