mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	David Brownell <david-b@pacbell.net>
Subject: Re: [PATCH] pl061: Trivial fix for offset value range checking
Date: Wed, 7 Apr 2010 07:42:27 +0300	[thread overview]
Message-ID: <20100407044225.GA4569@jasper.tkos.co.il> (raw)
In-Reply-To: <k2n427d64721004052233s314c7daj1f96a77061f6b836@mail.gmail.com>

Hi Axel,

On Tue, Apr 06, 2010 at 01:33:09PM +0800, Axel Lin wrote:
> The valid offset value is 0..PL061_GPIO_NR-1,
> this patch corrects the offset value range checking.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Baruch Siach <baruch@tkos.co.il>

Thanks.

baruch

> ---
>  drivers/gpio/pl061.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpio/pl061.c b/drivers/gpio/pl061.c
> index 5ad8f77..8e0906a 100644
> --- a/drivers/gpio/pl061.c
> +++ b/drivers/gpio/pl061.c
> @@ -158,7 +158,7 @@ static int pl061_irq_type(unsigned irq, unsigned trigger)
>  	unsigned long flags;
>  	u8 gpiois, gpioibe, gpioiev;
> 
> -	if (offset < 0 || offset > PL061_GPIO_NR)
> +	if (offset < 0 || offset >= PL061_GPIO_NR)
>  		return -EINVAL;
> 
>  	spin_lock_irqsave(&chip->irq_lock, flags);
> -- 
> 1.5.4.3

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

      reply	other threads:[~2010-04-07  5:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06  5:33 Axel Lin
2010-04-07  4:42 ` Baruch Siach [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=20100407044225.GA4569@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=axel.lin@gmail.com \
    --cc=david-b@pacbell.net \
    --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

Powered by JetHome