Skip to content

Commit

Permalink
sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
Browse files Browse the repository at this point in the history
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
Laurent Pinchart authored and Paul Mundt committed Sep 18, 2012
1 parent d4b7c5d commit 077664a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/sh/pfc/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 077664a

Please sign in to comment.