diff mbox

[-next] spi: core: fix missing unlock on error in __spi_pump_messages()

Message ID 1469525733-26302-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun July 26, 2016, 9:35 a.m. UTC
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@gmail.com>
---
 drivers/spi/spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 		}
 	}