From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Javier Martinez Canillas <javier@dowhile0.org>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Sachin Kamat <sachin.kamat@linaro.org>,
linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] Input: tnetv107x-keypad - make irqs signed for error handling
Date: Thu, 07 Nov 2013 07:52:40 +0000 [thread overview]
Message-ID: <20131107075240.GK21844@elgon.mountain> (raw)
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];
next reply other threads:[~2013-11-07 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 7:52 Dan Carpenter [this message]
2013-11-11 7:31 ` [patch] Input: tnetv107x-keypad - make irqs signed for error handling Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131107075240.GK21844@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=javier@dowhile0.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=sachin.kamat@linaro.org \
--cc=wfp5p@virginia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox