From: Samuel Ortiz <sameo@linux.intel.com>
To: Dan Carpenter <error27@gmail.com>,
Paul Fertser <fercerpav@gmail.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Arnaud Patard <arnaud.patard@rtp-net.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] mfd: off by one issue
Date: Fri, 2 Apr 2010 11:55:12 +0200 [thread overview]
Message-ID: <20100402095511.GA8010@sortiz.org> (raw)
In-Reply-To: <20100328112808.GO5069@bicker>
Hi Dan,
On Sun, Mar 28, 2010 at 02:28:08PM +0300, Dan Carpenter wrote:
> "pcf->irq_handler" has PCF50633_NUM_IRQ elements.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Patch applied, many thanks.
Cheers,
Samuel.
> diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
> index 03dcc92..4f13608 100644
> --- a/drivers/mfd/pcf50633-core.c
> +++ b/drivers/mfd/pcf50633-core.c
> @@ -217,7 +217,7 @@ static struct attribute_group pcf_attr_group = {
> int pcf50633_register_irq(struct pcf50633 *pcf, int irq,
> void (*handler) (int, void *), void *data)
> {
> - if (irq < 0 || irq > PCF50633_NUM_IRQ || !handler)
> + if (irq < 0 || irq >= PCF50633_NUM_IRQ || !handler)
> return -EINVAL;
>
> if (WARN_ON(pcf->irq_handler[irq].handler))
> @@ -234,7 +234,7 @@ EXPORT_SYMBOL_GPL(pcf50633_register_irq);
>
> int pcf50633_free_irq(struct pcf50633 *pcf, int irq)
> {
> - if (irq < 0 || irq > PCF50633_NUM_IRQ)
> + if (irq < 0 || irq >= PCF50633_NUM_IRQ)
> return -EINVAL;
>
> mutex_lock(&pcf->lock);
--
Intel Open Source Technology Centre
http://oss.intel.com/
prev parent reply other threads:[~2010-04-02 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-28 11:28 [patch] mfd: off by one issue Dan Carpenter
2010-04-02 9:55 ` Samuel Ortiz [this message]
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=20100402095511.GA8010@sortiz.org \
--to=sameo@linux.intel.com \
--cc=arnaud.patard@rtp-net.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=error27@gmail.com \
--cc=fercerpav@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
/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