pinctrl: rockchip: missing unlock on error in rockchip_set_pull()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 14 Nov 2013 08:22:54 +0000 (11:22 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 25 Nov 2013 08:08:18 +0000 (09:08 +0100)
We need to unlock here before returning -EINVAL.

Fixes: 6ca5274d1d12 ('pinctrl: rockchip: add rk3188 specifics')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-rockchip.c

index fe2ec1bdf56ed4778fe074119cf4148b2aa8358e..46dddc159286387dbbbe979d729d4d00cf159d43 100644 (file)
@@ -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;