diff mbox

sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path

Message ID 1347647148-28117-1-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive)
State Accepted
Commit 077664a2644ff6fa0fb1a0c15be96fed359d09f4
Headers show

Commit Message

Laurent Pinchart Sept. 14, 2012, 6:25 p.m. UTC
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>
---
 drivers/sh/pfc/pinctrl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

This is a v3.6 regression.

Comments

Paul Mundt Sept. 18, 2012, 7:50 a.m. UTC | #1
On Fri, Sep 14, 2012 at 08:25:48PM +0200, Laurent Pinchart wrote:
> 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>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c
index 2804eaa..a3ac39b 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;