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]
Date:	Fri, 5 Sep 2014 10:22:25 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Pramod Gurav <pramod.gurav@...rtplayin.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
Subject: Re: [PATCH 2/4] pinctrl: at91: Fix failure path in at91_gpio_probe path

On Sun, Aug 31, 2014 at 1:21 PM, Pramod Gurav
<pramod.gurav@...rtplayin.com> wrote:

> This fixes the whole error handling in probe function by capturing and
> returning error values on kernel function like clk_prepare,
> clk_enable, gpiochip_add etc.
>
> CC: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
> CC: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Pramod Gurav <pramod.gurav@...rtplayin.com>
> ---
>  drivers/pinctrl/pinctrl-at91.c |   20 +++++++++++++-------
>  1 files changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index 480460d..7abe683 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1578,16 +1578,19 @@ static int at91_gpio_probe(struct platform_device *pdev)
>         at91_chip->clock = devm_clk_get(&pdev->dev, NULL);
>         if (IS_ERR(at91_chip->clock)) {
>                 dev_err(&pdev->dev, "failed to get clock, ignoring.\n");
> +               ret = IS_ERR(at91_chip->clock);

No. IS_ERR() returns a bool.

You want to use PTR_ERR().

Yours,
Linus Walleij
--
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