lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOh2x=ncbWYKjwKrtXAeRVBakHi1Heu41L_Ffu4=Q1v1KbEYfA@mail.gmail.com>
Date:	Fri, 16 Nov 2012 12:35:59 +0530
From:	viresh kumar <viresh.kumar@...aro.org>
To:	Tushar Behera <tushar.behera@...aro.org>
Cc:	linux-kernel@...r.kernel.org, patches@...aro.org,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 07/14] pinctrl: SPEAr: Update error check for unsigned variables

On Fri, Nov 16, 2012 at 12:20 PM, Tushar Behera
<tushar.behera@...aro.org> wrote:
> Checking '< 0' for unsigned variables always returns false. For error
> codes, use IS_ERR_VALUE() instead.
>
> CC: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Tushar Behera <tushar.behera@...aro.org>
> ---
>  drivers/pinctrl/spear/pinctrl-plgpio.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
> index 1044ad3..9e0c731 100644
> --- a/drivers/pinctrl/spear/pinctrl-plgpio.c
> +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
> @@ -283,7 +283,7 @@ static int plgpio_to_irq(struct gpio_chip *chip, unsigned offset)
>  {
>         struct plgpio *plgpio = container_of(chip, struct plgpio, chip);
>
> -       if (plgpio->irq_base < 0)
> +       if (IS_ERR_VALUE(plgpio->irq_base))
>                 return -EINVAL;
>
>         return irq_find_mapping(plgpio->irq_domain, offset);

Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ