aboutsummaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorWei Yongjun2018-07-11 12:33:31 +0000
committerLinus Walleij2018-07-17 10:50:05 +0200
commit673ba5a05ca14c2ddef038044768a4acd0ae0a53 (patch)
tree92d3a0bb08baa53ae40997a39bee22954c6aee92 /drivers/pinctrl
parent93639058b2af462a9871159be1afe60eab59431e (diff)
pinctrl: single: Fix missing unlock on error path
Add the missing unlock before return from function in the error handling case. Fixes: 0f5972033509 ("pinctrl: single: Fix group and function selector use") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-single.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 42d7e76baccf..9fa2f54bb1a3 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1071,8 +1071,8 @@ free_pingroups:
*num_maps = 1;
free_function:
pinmux_generic_remove_function(pcs->pctl, fsel);
- mutex_unlock(&pcs->mutex);
free_pins:
+ mutex_unlock(&pcs->mutex);
devm_kfree(pcs->dev, pins);
free_vals:
@@ -1211,8 +1211,8 @@ free_pingroups:
*num_maps = 1;
free_function:
pinmux_generic_remove_function(pcs->pctl, fsel);
- mutex_unlock(&pcs->mutex);
free_pins:
+ mutex_unlock(&pcs->mutex);
devm_kfree(pcs->dev, pins);
free_vals: