On Sun, Aug 31, 2014 at 1:21 PM, Pramod Gurav <[email protected]> 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 <[email protected]> > CC: Linus Walleij <[email protected]> > Signed-off-by: Pramod Gurav <[email protected]> > --- > 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

