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: e546427762
("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>
This commit is contained in:
parent
d63f11c02b
commit
3787035861
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue