Commit 37870358 authored by Dan Carpenter's avatar Dan Carpenter Committed by Bartosz Golaszewski

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: e5464277 ("gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent d63f11c0
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment