aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-exynos5440.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinctrl-exynos5440.c')
-rw-r--r--drivers/pinctrl/pinctrl-exynos5440.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c
index eb8e502e11ef..7126b7db86c5 100644
--- a/drivers/pinctrl/pinctrl-exynos5440.c
+++ b/drivers/pinctrl/pinctrl-exynos5440.c
@@ -670,8 +670,10 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev,
670 670
671 ret = exynos5440_pinctrl_parse_dt_pins(pdev, cfg_np, 671 ret = exynos5440_pinctrl_parse_dt_pins(pdev, cfg_np,
672 &pin_list, &npins); 672 &pin_list, &npins);
673 if (ret) 673 if (ret) {
674 return ret; 674 gname = NULL;
675 goto skip_to_pin_function;
676 }
675 677
676 /* derive pin group name from the node name */ 678 /* derive pin group name from the node name */
677 gname = devm_kzalloc(dev, strlen(cfg_np->name) + GSUFFIX_LEN, 679 gname = devm_kzalloc(dev, strlen(cfg_np->name) + GSUFFIX_LEN,
@@ -687,6 +689,7 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev,
687 grp->num_pins = npins; 689 grp->num_pins = npins;
688 grp++; 690 grp++;
689 691
692skip_to_pin_function:
690 ret = of_property_read_u32(cfg_np, "samsung,exynos5440-pin-function", 693 ret = of_property_read_u32(cfg_np, "samsung,exynos5440-pin-function",
691 &function); 694 &function);
692 if (ret) 695 if (ret)
@@ -709,7 +712,7 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev,
709 return -ENOMEM; 712 return -ENOMEM;
710 } 713 }
711 func->groups[0] = gname; 714 func->groups[0] = gname;
712 func->num_groups = 1; 715 func->num_groups = gname ? 1 : 0;
713 func->function = function; 716 func->function = function;
714 func++; 717 func++;
715 func_idx++; 718 func_idx++;