From: Laurent Pinchart Date: Fri, 14 Sep 2012 18:25:48 +0000 (+0200) Subject: sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=077664a2644ff6fa0fb1a0c15be96fed359d09f4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path The sh_pfc_gpio_request_enable() function acquires a spinlock but fails to release it before returning if the requested mux type is not supported. Fix this. Signed-off-by: Laurent Pinchart Signed-off-by: Paul Mundt --- diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c index 2804eaae804e..a3ac39b79192 100644 --- a/drivers/sh/pfc/pinctrl.c +++ b/drivers/sh/pfc/pinctrl.c @@ -211,7 +211,8 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev, break; default: pr_err("Unsupported mux type (%d), bailing...\n", pinmux_type); - return -ENOTSUPP; + ret = -ENOTSUPP; + goto err; } ret = 0;