summaryrefslogtreecommitdiffstats
path: root/drivers/sh
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-09-14 20:25:48 +0200
committerPaul Mundt <lethal@linux-sh.org>2012-09-18 16:54:46 +0900
commit077664a2644ff6fa0fb1a0c15be96fed359d09f4 (patch)
treeb09b296f19553512c550418da3396a7003b384d5 /drivers/sh
parentd4b7c5db429fbfd3c79120b27ccf66d583606b57 (diff)
downloadlinux-stable-077664a2644ff6fa0fb1a0c15be96fed359d09f4.tar.gz
linux-stable-077664a2644ff6fa0fb1a0c15be96fed359d09f4.tar.bz2
linux-stable-077664a2644ff6fa0fb1a0c15be96fed359d09f4.zip
sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
The sh_pfc_gpio_request_enable() function acquires a spinlock but fails to release it before returning if the requested mux type is not supported. Fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/sh')
-rw-r--r--drivers/sh/pfc/pinctrl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c
index 2804eaae804e..a3ac39b79192 100644
--- a/drivers/sh/pfc/pinctrl.c
+++ b/drivers/sh/pfc/pinctrl.c
@@ -211,7 +211,8 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev,
break;
default:
pr_err("Unsupported mux type (%d), bailing...\n", pinmux_type);
- return -ENOTSUPP;
+ ret = -ENOTSUPP;
+ goto err;
}
ret = 0;