From c4cf61caaf87867e5e4c5e9bec680d75d97341e9 Mon Sep 17 00:00:00 2001 From: Bhaumik Bhatt Date: Wed, 21 Apr 2021 14:43:58 -0700 Subject: [PATCH] bus: mhi: core: Delete ring element after processing misc command An out of order completion is seen since the ring element for any misc command is not deleted after it is processed. Fix this issue by deleting the ring element after misc command processing and avoid a kernel panic. Change-Id: Ie116a3c964ed2a1090e8ccc010c3781332dc88e8 Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c index 9cd4c82da0a8..bbda19cbe8a8 100644 --- a/drivers/bus/mhi/core/main.c +++ b/drivers/bus/mhi/core/main.c @@ -746,7 +746,7 @@ static void mhi_process_cmd_completion(struct mhi_controller *mhi_cntrl, if (MHI_TRE_GET_CMD_TYPE(cmd_pkt) == MHI_CMD_SFR_CFG) { mhi_misc_cmd_completion(mhi_cntrl, MHI_CMD_SFR_CFG, MHI_TRE_GET_EV_CODE(tre)); - return; + goto exit_cmd_completion; } chan = MHI_TRE_GET_CMD_CHID(cmd_pkt);