Permalink
Browse files

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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information...
1 parent d4b7c5d commit 077664a2644ff6fa0fb1a0c15be96fed359d09f4 @pinchartl pinchartl committed with Paul Mundt Sep 14, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 drivers/sh/pfc/pinctrl.c
View
@@ -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;

0 comments on commit 077664a

Please sign in to comment.