Commit aa1dd80f authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

pinctrl: intel: unlock on error in intel_config_set_pull()

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

Fixes: 04cc058f ("pinctrl: intel: Add support for 1k additional pull-down")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 9ec1a286
...@@ -599,8 +599,10 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned pin, ...@@ -599,8 +599,10 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned pin,
value |= PADCFG1_TERM_5K << PADCFG1_TERM_SHIFT; value |= PADCFG1_TERM_5K << PADCFG1_TERM_SHIFT;
break; break;
case 1000: case 1000:
if (!(community->features & PINCTRL_FEATURE_1K_PD)) if (!(community->features & PINCTRL_FEATURE_1K_PD)) {
return -EINVAL; ret = -EINVAL;
break;
}
value |= PADCFG1_TERM_1K << PADCFG1_TERM_SHIFT; value |= PADCFG1_TERM_1K << PADCFG1_TERM_SHIFT;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment