Skip to content

Commit

Permalink
pinctrl: fix missing unlock on error in pinctrl_groups_show()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Linus Walleij committed Oct 23, 2012
1 parent 268300b commit b4dd784
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit b4dd784

Please sign in to comment.