linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] pinctrl: intel: unlock on error in intel_config_set_pull()
@ 2017-02-07 13:20 Dan Carpenter
  2017-02-13 14:42 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-02-07 13:20 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: Heikki Krogerus, Linus Walleij, linux-gpio, kernel-janitors

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>

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:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-13 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 13:20 [patch] pinctrl: intel: unlock on error in intel_config_set_pull() Dan Carpenter
2017-02-13 14:42 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).