summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pinctrl/pinctrl-tegra186-padctl.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra186-padctl.c b/drivers/pinctrl/pinctrl-tegra186-padctl.c
index eb5844b06..a15c5ee57 100644
--- a/drivers/pinctrl/pinctrl-tegra186-padctl.c
+++ b/drivers/pinctrl/pinctrl-tegra186-padctl.c
@@ -3119,9 +3119,15 @@ static int tegra186_padctl_probe(struct platform_device *pdev)
3119 3119
3120restore_oc_pin: 3120restore_oc_pin:
3121 if (padctl->oc_pinctrl) 3121 if (padctl->oc_pinctrl)
3122 for (i--; i >= 0; i--) 3122 for (i--; i >= 0; i--) {
3123 pinctrl_select_state(padctl->oc_pinctrl, 3123 err = pinctrl_select_state(padctl->oc_pinctrl,
3124 padctl->oc_disable[i]); 3124 padctl->oc_disable[i]);
3125 if (err < 0)
3126 dev_err(dev,
3127 "set pin %d OC disable failed: %d\n",
3128 i, err);
3129 }
3130
3125 3131
3126free_mailbox: 3132free_mailbox:
3127 if (!IS_ERR(padctl->mbox_chan)) { 3133 if (!IS_ERR(padctl->mbox_chan)) {
@@ -3148,12 +3154,18 @@ static int tegra186_padctl_remove(struct platform_device *pdev)
3148{ 3154{
3149 struct tegra_padctl *padctl = platform_get_drvdata(pdev); 3155 struct tegra_padctl *padctl = platform_get_drvdata(pdev);
3150 int i; 3156 int i;
3157 int err;
3151 3158
3152 /* switch all VBUS_ENx pins back to default state */ 3159 /* switch all VBUS_ENx pins back to default state */
3153 if (padctl->oc_pinctrl) 3160 if (padctl->oc_pinctrl)
3154 for (i = 0; i < padctl->soc->num_oc_pins; i++) 3161 for (i = 0; i < padctl->soc->num_oc_pins; i++) {
3155 pinctrl_select_state(padctl->oc_pinctrl, 3162 err = pinctrl_select_state(padctl->oc_pinctrl,
3156 padctl->oc_disable[i]); 3163 padctl->oc_disable[i]);
3164 if (err < 0)
3165 dev_err(&pdev->dev,
3166 "set pin %d OC disable failed: %d\n",
3167 i, err);
3168 }
3157 3169
3158 sysfs_remove_group(&pdev->dev.kobj, &padctl_attr_group); 3170 sysfs_remove_group(&pdev->dev.kobj, &padctl_attr_group);
3159 3171