diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-02-07 16:20:08 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-02-13 15:42:26 +0100 |
commit | aa1dd80f80ccf3a47227ab42625e7bbacd5ff272 (patch) | |
tree | db6c9ea6355564f0bdbe17b4fa5fc0bca0209ab4 /drivers/pinctrl | |
parent | 9ec1a286d0b3c13f50c96e00e5890bc17a82492f (diff) | |
download | lwn-aa1dd80f80ccf3a47227ab42625e7bbacd5ff272.tar.gz lwn-aa1dd80f80ccf3a47227ab42625e7bbacd5ff272.zip |
pinctrl: intel: unlock on error in intel_config_set_pull()
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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 523264463d35..592b465e981e 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -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: |