]>
Commit | Line | Data |
---|---|---|
4fa517f7 GKH |
1 | From b4dd784ba8af03bf1f9ee5118c792d7abd4919bd Mon Sep 17 00:00:00 2001 |
2 | From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> | |
3 | Date: Mon, 22 Oct 2012 12:58:09 +0800 | |
4 | Subject: pinctrl: fix missing unlock on error in pinctrl_groups_show() | |
5 | ||
6 | From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> | |
7 | ||
8 | commit b4dd784ba8af03bf1f9ee5118c792d7abd4919bd upstream. | |
9 | ||
10 | Add the missing unlock on the error handle path in function | |
11 | pinctrl_groups_show(). | |
12 | ||
13 | Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> | |
14 | Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | |
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
16 | ||
17 | --- | |
18 | drivers/pinctrl/core.c | 4 +++- | |
19 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
20 | ||
21 | --- a/drivers/pinctrl/core.c | |
22 | +++ b/drivers/pinctrl/core.c | |
23 | @@ -1059,8 +1059,10 @@ static int pinctrl_groups_show(struct se | |
24 | seq_printf(s, "group: %s\n", gname); | |
25 | for (i = 0; i < num_pins; i++) { | |
26 | pname = pin_get_name(pctldev, pins[i]); | |
27 | - if (WARN_ON(!pname)) | |
28 | + if (WARN_ON(!pname)) { | |
29 | + mutex_unlock(&pinctrl_mutex); | |
30 | return -EINVAL; | |
31 | + } | |
32 | seq_printf(s, "pin %d (%s)\n", pins[i], pname); | |
33 | } | |
34 | seq_puts(s, "\n"); |