Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4dd784b authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Walleij
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 268300be
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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");