pinctrl: fix missing unlock on error in pinctrl_groups_show()
Add the missing unlock on the error handle path in function pinctrl_groups_show(). Cc: stable@kernel.org Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
268300be0e
commit
b4dd784ba8
|
@ -1061,8 +1061,10 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
|
|||
seq_printf(s, "group: %s\n", gname);
|
||||
for (i = 0; i < num_pins; i++) {
|
||||
pname = pin_get_name(pctldev, pins[i]);
|
||||
if (WARN_ON(!pname))
|
||||
if (WARN_ON(!pname)) {
|
||||
mutex_unlock(&pinctrl_mutex);
|
||||
return -EINVAL;
|
||||
}
|
||||
seq_printf(s, "pin %d (%s)\n", pins[i], pname);
|
||||
}
|
||||
seq_puts(s, "\n");
|
||||
|
|
Loading…
Reference in New Issue