[alsa-devel] [PATCH] slimbus: Unlock on error path in slim_msg_response()

Dan Carpenter dan.carpenter at oracle.com
Tue Jan 9 10:34:35 CET 2018


We need to unlock and restore IRQs before returning on this error path.

Fixes afbdcc7c384b0 ("slimbus: Add messaging APIs to slimbus framework")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c
index 755462a4c75e..94818a8427e2 100644
--- a/drivers/slimbus/messaging.c
+++ b/drivers/slimbus/messaging.c
@@ -36,6 +36,7 @@ void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 len)
 
 	msg = txn->msg;
 	if (msg == NULL || msg->rbuf == NULL) {
+		spin_unlock_irqrestore(&ctrl->txn_lock, flags);
 		dev_err(ctrl->dev, "Got response to invalid TID:%d, len:%d\n",
 				tid, len);
 		return;


More information about the Alsa-devel mailing list