From 6d33ee7a05341f9ddcaa9374d3d6800919e2f150 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 24 Feb 2016 14:44:07 +0530 Subject: [PATCH] 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 Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org Acked-by: Robert Jarzmik Signed-off-by: Linus Walleij --- drivers/pinctrl/pxa/pinctrl-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pxa/pinctrl-pxa2xx.c b/drivers/pinctrl/pxa/pinctrl-pxa2xx.c index 6098685f0116..866aa3ce1ac9 100644 --- a/drivers/pinctrl/pxa/pinctrl-pxa2xx.c +++ b/drivers/pinctrl/pxa/pinctrl-pxa2xx.c @@ -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); -- 2.20.1