From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Dan Carpenter <error27@gmail.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 1/4] mfd: WM8350 off by one bug
Date: Tue, 5 Jan 2010 13:59:06 +0000 [thread overview]
Message-ID: <1262699949-3079-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20100105135756.GA2993@rakim.wolfsonmicro.main>
From: Dan Carpenter <error27@gmail.com>
If irq == WM8350_NUM_IRQ that would put us past the end of the array.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/mfd/wm8350-irq.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c
index c8df547..9025f29 100644
--- a/drivers/mfd/wm8350-irq.c
+++ b/drivers/mfd/wm8350-irq.c
@@ -434,7 +434,7 @@ int wm8350_register_irq(struct wm8350 *wm8350, int irq,
irq_handler_t handler, unsigned long flags,
const char *name, void *data)
{
- if (irq < 0 || irq > WM8350_NUM_IRQ || !handler)
+ if (irq < 0 || irq >= WM8350_NUM_IRQ || !handler)
return -EINVAL;
if (wm8350->irq[irq].handler)
@@ -453,7 +453,7 @@ EXPORT_SYMBOL_GPL(wm8350_register_irq);
int wm8350_free_irq(struct wm8350 *wm8350, int irq)
{
- if (irq < 0 || irq > WM8350_NUM_IRQ)
+ if (irq < 0 || irq >= WM8350_NUM_IRQ)
return -EINVAL;
wm8350_mask_irq(wm8350, irq);
--
1.6.5.7
next prev parent reply other threads:[~2010-01-05 13:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 13:57 [PATCH 0/4] Convert WM8350 to genirq Mark Brown
2010-01-05 13:59 ` Mark Brown [this message]
2010-01-05 13:59 ` [PATCH 2/4] mfd: Add a data argument to the WM8350 IRQ free function Mark Brown
2010-01-05 13:59 ` [PATCH 3/4] rtc: Suppress duplicate enable/disable of WM8350 update interrupt Mark Brown
2010-01-05 13:59 ` [PATCH 4/4] mfd: Convert WM8350 to genirq Mark Brown
2010-01-05 20:40 ` [PATCH 5/4] mfd: Don't allow WM8350 to be built modular Mark Brown
2010-01-06 8:56 ` Samuel Ortiz
2010-01-05 15:04 ` [PATCH 3/4] rtc: Suppress duplicate enable/disable of WM8350 update interrupt Alessandro Zummo
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=1262699949-3079-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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
all inboxes | Powered by JetHome®