From: Dan Carpenter Date: Thu, 14 Nov 2013 08:22:54 +0000 (+0300) Subject: pinctrl: rockchip: missing unlock on error in rockchip_set_pull() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d32c3e260f95f5d8ed42c64dc2d9ec79cc36da1e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git pinctrl: rockchip: missing unlock on error in rockchip_set_pull() We need to unlock here before returning -EINVAL. Fixes: 6ca5274d1d12 ('pinctrl: rockchip: add rk3188 specifics') Signed-off-by: Dan Carpenter Acked-by: Heiko Stuebner Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index fe2ec1bdf56e..46dddc159286 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -504,6 +504,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank, data |= (3 << bit); break; default: + spin_unlock_irqrestore(&bank->slock, flags); dev_err(info->dev, "unsupported pull setting %d\n", pull); return -EINVAL;