Skip to content

Commit 3787035

Browse files
error27Bartosz Golaszewski
authored andcommitted
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: e546427 ("gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Marek Vasut <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent d63f11c commit 3787035

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpio/gpio-mxc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,11 @@ static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio)
249249
} else {
250250
pr_err("mxc: invalid configuration for GPIO %d: %x\n",
251251
gpio, edge);
252-
return;
252+
goto unlock;
253253
}
254254
writel(val | (edge << (bit << 1)), reg);
255255

256+
unlock:
256257
raw_spin_unlock_irqrestore(&port->gc.bgpio_lock, flags);
257258
}
258259

0 commit comments

Comments
 (0)