Add the missing unlock before return from function __spi_pump_messages() in the error handling case. Fixes: ef4d96ec4ad9 ("spi: Split bus and I/O locking") Signed-off-by: Wei Yongjun <weiyj.lk@xxxxxxxxx> --- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 51ad42f..a1be046 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1159,7 +1159,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) if (ret < 0) { dev_err(&master->dev, "Failed to power device: %d\n", ret); - return; + goto out; } } @@ -1174,7 +1174,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) if (master->auto_runtime_pm) pm_runtime_put(master->dev.parent); - return; + goto out; } } -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html