* [patch] Input: tnetv107x-keypad - make irqs signed for error handling
@ 2013-11-07 7:52 Dan Carpenter
2013-11-11 7:31 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-11-07 7:52 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Bill Pemberton, Mark Brown, Javier Martinez Canillas,
Russell King, Sachin Kamat, linux-input, kernel-janitors
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>
diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c
index 5f7b427..8bd24d5 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];
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] Input: tnetv107x-keypad - make irqs signed for error handling
2013-11-07 7:52 [patch] Input: tnetv107x-keypad - make irqs signed for error handling Dan Carpenter
@ 2013-11-11 7:31 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2013-11-11 7:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bill Pemberton, Mark Brown, Javier Martinez Canillas,
Russell King, Sachin Kamat, linux-input, kernel-janitors
On Thu, Nov 07, 2013 at 10:52:40AM +0300, Dan Carpenter wrote:
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-11 7:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 7:52 [patch] Input: tnetv107x-keypad - make irqs signed for error handling Dan Carpenter
2013-11-11 7:31 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).