aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-11-11 02:31:17 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-11-11 03:01:44 -0500
commita108193cf9685061660e111f985594d6a344abfb (patch)
tree3cd3450cbf111605a94b2e2491c3fa2d9b0f9b09
parentc6d81bd7237b5785080087bcf796ce456ef69557 (diff)
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 <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/keyboard/tnetv107x-keypad.c4
1 files changed, 2 insertions, 2 deletions
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 {
60 struct clk *clk; 60 struct clk *clk;
61 struct device *dev; 61 struct device *dev;
62 spinlock_t lock; 62 spinlock_t lock;
63 u32 irq_press; 63 int irq_press;
64 u32 irq_release; 64 int irq_release;
65 int rows, cols, row_shift; 65 int rows, cols, row_shift;
66 int debounce_ms, active_low; 66 int debounce_ms, active_low;
67 u32 prev_keys[3]; 67 u32 prev_keys[3];