pinctrl: pxa: Use devm_pinctrl_register() for pinctrl registration

Use devm_pinctrl_register() for pin control registration and clean
the error path.

Signed-off-by: Laxman Dewangan <[email protected]>
Cc: Daniel Mack <[email protected]>
Cc: Haojian Zhuang <[email protected]>
Cc: Robert Jarzmik <[email protected]>
Cc: [email protected]
Acked-by: Robert Jarzmik <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Laxman Dewangan authored and Linus Walleij committed 2016-04-21 00:03:04 +02:00
1 parent fe0267f47a
commit 6d33ee7a05
1 file changed
+1 -1
+1 -1
View File
@@ -416,7 +416,7 @@ int pxa2xx_pinctrl_init(struct platform_device *pdev,
if (ret)
return ret;
pctl->pctl_dev = pinctrl_register(&pctl->desc, &pdev->dev, pctl);
pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->desc, pctl);
if (IS_ERR(pctl->pctl_dev)) {
dev_err(&pdev->dev, "couldn't register pinctrl driver\n");
return PTR_ERR(pctl->pctl_dev);