1
0
Fork 0

pinctrl: intel: unlock on error in intel_config_set_pull()

We need to unlock before returning -EINVAL on this error path.

Fixes: 04cc058f0c ("pinctrl: intel: Add support for 1k additional pull-down")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
hifive-unleashed-5.1
Dan Carpenter 2017-02-07 16:20:08 +03:00 committed by Linus Walleij
parent 9ec1a286d0
commit aa1dd80f80
1 changed files with 4 additions and 2 deletions

View File

@ -599,8 +599,10 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned pin,
value |= PADCFG1_TERM_5K << PADCFG1_TERM_SHIFT;
break;
case 1000:
if (!(community->features & PINCTRL_FEATURE_1K_PD))
return -EINVAL;
if (!(community->features & PINCTRL_FEATURE_1K_PD)) {
ret = -EINVAL;
break;
}
value |= PADCFG1_TERM_1K << PADCFG1_TERM_SHIFT;
break;
default: