提交 07b7eb92 编写于 作者: L Linus Walleij

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 6ad30ce0Reported-by: NSherman Yin <syin@broadcom.com>
Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 acf564a8
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册