]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 14 Sep 2012 18:25:48 +0000 (20:25 +0200)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 18 Sep 2012 07:54:46 +0000 (16:54 +0900)
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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/pfc/pinctrl.c

index 2804eaae804e7279aedb64f52066e380212a2176..a3ac39b79192a4c8f2de0d063054f5477a1f257a 100644 (file)
@@ -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;