pinctrl: at91: Fix error handling while doing gpiochio_irqchip_add
authorPramod Gurav <pramod.gurav@smartplayin.com>
Tue, 9 Sep 2014 10:20:37 +0000 (15:50 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Sep 2014 14:46:47 +0000 (16:46 +0200)
commit834e1678649db1e064ee397cca161a65bacfa801
tree578f7ec483d3d97cce2b029cb9cfd7bdc2b1e78d
parent70e4197420a154a2a684b6e7b496dda70b20d9ec
pinctrl: at91: Fix error handling while doing gpiochio_irqchip_add

This patch removes a call to panic function when gpiochio_irqchip_add
fails and just returns the error to the calling function.
Same return value is used to handle the error case and adds a lable
to release resources on error.
The error message has been improved to indicate failure to add irqchip
to gpiochip.

This also changes first argument to function at91_gpio_of_irq_setup from
struct device_node to struct platform_device. Because The device_node
argument was anyway not being used. Passed pdev so that on failure dev_err
can use &pdev->dev and log can be associated with proper device.

CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
CC: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91.c
This page took 0.031906 seconds and 5 git commands to generate.