We need to unlock before returning -EINVAL on this error path.
Fixes: 04cc058f0c52 ("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>
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: