diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-08-29 13:17:13 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-08-30 03:57:27 -0400 |
commit | 07b7eb927994b8e78267a20244ecc9d49fb15d95 (patch) | |
tree | e3e671316ad7fb4598d551f15b6a2a7fc25b2f64 /drivers/pinctrl/pinctrl-sunxi.c | |
parent | acf564a8f325566628a4ee2d9403cf1688cd0796 (diff) |
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/pinctrl-sunxi.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-sunxi.c | 4 |
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, | |||
291 | switch (pinconf_to_config_param(configs[i])) { | 291 | switch (pinconf_to_config_param(configs[i])) { |
292 | case PIN_CONFIG_DRIVE_STRENGTH: | 292 | case PIN_CONFIG_DRIVE_STRENGTH: |
293 | strength = pinconf_to_config_argument(configs[i]); | 293 | strength = pinconf_to_config_argument(configs[i]); |
294 | if (strength > 40) | 294 | if (strength > 40) { |
295 | spin_unlock_irqrestore(&pctl->lock, flags); | ||
295 | return -EINVAL; | 296 | return -EINVAL; |
297 | } | ||
296 | /* | 298 | /* |
297 | * We convert from mA to what the register expects: | 299 | * We convert from mA to what the register expects: |
298 | * 0: 10mA | 300 | * 0: 10mA |