diff options
author | Dan Carpenter <error27@gmail.com> | 2023-01-24 18:20:26 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-01-25 13:33:29 +0100 |
commit | 37870358616ca7fdb1e90ad1cdd791655ec54414 (patch) | |
tree | 99eee13e48ad3b1b667dc479263682b0aace87e9 /drivers/gpio | |
parent | d63f11c02b8d3e54bdb65d8c309f73b7f474aec4 (diff) | |
download | linux-37870358616ca7fdb1e90ad1cdd791655ec54414.tar.gz linux-37870358616ca7fdb1e90ad1cdd791655ec54414.tar.bz2 linux-37870358616ca7fdb1e90ad1cdd791655ec54414.zip |
gpio: mxc: Unlock on error path in mxc_flip_edge()
We recently added locking to this function but one error path was
over looked. Drop the lock before returning.
Fixes: e5464277625c ("gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-mxc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 6f673b2f2a1b..9d0cec4b82a3 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c @@ -249,10 +249,11 @@ static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio) } else { pr_err("mxc: invalid configuration for GPIO %d: %x\n", gpio, edge); - return; + goto unlock; } writel(val | (edge << (bit << 1)), reg); +unlock: raw_spin_unlock_irqrestore(&port->gc.bgpio_lock, flags); } |