* [PATCH -next] pinctrl: single: Fix missing unlock on error path
@ 2018-07-11 12:33 Wei Yongjun
2018-07-12 5:26 ` Tony Lindgren
2018-07-13 6:48 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2018-07-11 12:33 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/pinctrl/pinctrl-single.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 7dc680e..7ec72ff 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1071,8 +1071,8 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
*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 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,
*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:
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-13 6:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-11 12:33 [PATCH -next] pinctrl: single: Fix missing unlock on error path Wei Yongjun
2018-07-12 5:26 ` Tony Lindgren
2018-07-13 6:48 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).