diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-22 12:58:09 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-28 10:56:15 -0700 |
commit | 651d36d9fc0dc6aef0889bdf8321bb8870782141 (patch) | |
tree | b2554a055d3c49c3c8671762b2412825dfd9bb57 | |
parent | 49d14e6bc5f7a8ff3f581f9399f0992622c35556 (diff) | |
download | linux-stable-651d36d9fc0dc6aef0889bdf8321bb8870782141.tar.gz linux-stable-651d36d9fc0dc6aef0889bdf8321bb8870782141.tar.bz2 linux-stable-651d36d9fc0dc6aef0889bdf8321bb8870782141.zip |
pinctrl: fix missing unlock on error in pinctrl_groups_show()
commit b4dd784ba8af03bf1f9ee5118c792d7abd4919bd upstream.
Add the missing unlock on the error handle path in function
pinctrl_groups_show().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/pinctrl/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index dc5c126e398a..63560c3a322c 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1059,8 +1059,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"); |