summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-08-29 19:17:13 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-08-30 09:57:27 +0200
commit07b7eb927994b8e78267a20244ecc9d49fb15d95 (patch)
treee3e671316ad7fb4598d551f15b6a2a7fc25b2f64 /drivers/pinctrl
parentacf564a8f325566628a4ee2d9403cf1688cd0796 (diff)
downloadlinux-07b7eb927994b8e78267a20244ecc9d49fb15d95.tar.bz2
pinctrl: sunxi: drop lock on error path
I forgot to drop the lock for the return inside the loop protected by the spinlock in the pin config routine when merging in -rc7 in commit 6ad30ce046aefbdc3848232c665a728860d7bb68 Reported-by: Sherman Yin <syin@broadcom.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-sunxi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
index 532202bbfc33..4432e5e062c5 100644
--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@ -291,8 +291,10 @@ static int sunxi_pconf_group_set(struct pinctrl_dev *pctldev,
switch (pinconf_to_config_param(configs[i])) {
case PIN_CONFIG_DRIVE_STRENGTH:
strength = pinconf_to_config_argument(configs[i]);
- if (strength > 40)
+ if (strength > 40) {
+ spin_unlock_irqrestore(&pctl->lock, flags);
return -EINVAL;
+ }
/*
* We convert from mA to what the register expects:
* 0: 10mA