]> Git Repo - linux.git/commitdiff
pinctrl/spear: simplify the return expression of spear300_pinctrl_probe()
authorZheng Yongjun <[email protected]>
Thu, 10 Dec 2020 13:57:46 +0000 (21:57 +0800)
committerLinus Walleij <[email protected]>
Sat, 12 Dec 2020 00:42:06 +0000 (01:42 +0100)
Simplify the return expression.

Signed-off-by: Zheng Yongjun <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
drivers/pinctrl/spear/pinctrl-spear300.c

index e39913a1813955e6255567cc42f72f5403088935..d53a04597cbe09bc0aae0ab29fea697b05418ae8 100644 (file)
@@ -654,8 +654,6 @@ static const struct of_device_id spear300_pinctrl_of_match[] = {
 
 static int spear300_pinctrl_probe(struct platform_device *pdev)
 {
-       int ret;
-
        spear3xx_machdata.groups = spear300_pingroups;
        spear3xx_machdata.ngroups = ARRAY_SIZE(spear300_pingroups);
        spear3xx_machdata.functions = spear300_functions;
@@ -669,11 +667,7 @@ static int spear300_pinctrl_probe(struct platform_device *pdev)
 
        pmx_init_addr(&spear3xx_machdata, PMX_CONFIG_REG);
 
-       ret = spear_pinctrl_probe(pdev, &spear3xx_machdata);
-       if (ret)
-               return ret;
-
-       return 0;
+       return spear_pinctrl_probe(pdev, &spear3xx_machdata);
 }
 
 static struct platform_driver spear300_pinctrl_driver = {
This page took 0.077932 seconds and 4 git commands to generate.