Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07b7eb92 authored by Linus Walleij's avatar Linus Walleij
Browse files

pinctrl: sunxi: drop lock on error path



I forgot to drop the lock for the return inside the loop
protected by the spinlock in the pin config routine when
merging in -rc7 in commit 6ad30ce0

Reported-by: default avatarSherman Yin <syin@broadcom.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent acf564a8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -291,8 +291,10 @@ static int sunxi_pconf_group_set(struct pinctrl_dev *pctldev,
		switch (pinconf_to_config_param(configs[i])) {
		case PIN_CONFIG_DRIVE_STRENGTH:
			strength = pinconf_to_config_argument(configs[i]);
			if (strength > 40)
			if (strength > 40) {
				spin_unlock_irqrestore(&pctl->lock, flags);
				return -EINVAL;
			}
			/*
			 * We convert from mA to what the register expects:
			 *   0: 10mA