linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
@ 2012-09-14 18:25 Laurent Pinchart
  2012-09-18  7:50 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2012-09-14 18:25 UTC (permalink / raw)
  To: linux-sh

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.

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;
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
  2012-09-14 18:25 [PATCH] sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path Laurent Pinchart
@ 2012-09-18  7:50 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2012-09-18  7:50 UTC (permalink / raw)
  To: linux-sh

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-18  7:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 18:25 [PATCH] sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path Laurent Pinchart
2012-09-18  7:50 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).