[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdY1Oebw8P4gnR7RORakj-vG+hG+1yXF0tpDaaKZ6z=hEw@mail.gmail.com>
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