summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-bcm2835.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-07 22:01:15 +0800
committerLinus Walleij <linus.walleij@linaro.org>2012-10-15 09:09:27 +0200
commit3ee73aa077d1468b293bb208814a8c240eefa9b7 (patch)
treefdd139a5c18f21db3a8c2064a9eb4d68ba825b0a /drivers/pinctrl/pinctrl-bcm2835.c
parent1cd6dc2e3c2dbececb60a3a5ca52af645d9be205 (diff)
pinctrl: fix return value in bcm2835_pinctrl_probe()
In case of error, the function pinctrl_register() returns NULL not ERR_PTR(). The PTR_ERR() in the return value should be replaced with error no. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-bcm2835.c')
-rw-r--r--drivers/pinctrl/pinctrl-bcm2835.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c
index 956d585309b..7e9be18ec2d 100644
--- a/drivers/pinctrl/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/pinctrl-bcm2835.c
@@ -1031,7 +1031,7 @@ static int __devinit bcm2835_pinctrl_probe(struct platform_device *pdev)
pc->pctl_dev = pinctrl_register(&bcm2835_pinctrl_desc, dev, pc);
if (!pc->pctl_dev) {
gpiochip_remove(&pc->gpio_chip);
- return PTR_ERR(pc->pctl_dev);
+ return -EINVAL;
}
pc->gpio_range = bcm2835_pinctrl_gpio_range;