Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 077664a2 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Paul Mundt
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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent d4b7c5db
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;