]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
slimbus: Fix missing unlock on error in slim_msg_response()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 2 Jan 2018 17:54:23 +0000 (17:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Jan 2018 16:00:13 +0000 (17:00 +0100)
Add the missing unlock before return from function slim_msg_response()
in the error handling case.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/slimbus/messaging.c

index a9a6dc4af0da97ea0d75b95342dc2257b4c61225..884419c37e8419c8e2a955e4406f75d68e1e1298 100644 (file)
@@ -38,6 +38,7 @@ void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 len)
        if (msg == NULL || msg->rbuf == NULL) {
                dev_err(ctrl->dev, "Got response to invalid TID:%d, len:%d\n",
                                tid, len);
+               spin_unlock_irqrestore(&ctrl->txn_lock, flags);
                return;
        }