From f793818297263d981ad7ce5a8f7f022f3c6b3a55 Mon Sep 17 00:00:00 2001 From: Vivek Pernamitta Date: Mon, 9 Aug 2021 18:12:58 +0530 Subject: [PATCH] mhi: core: Release write lock in mhi fast resume on failure Release write lock when EP config space is not accessible while mhi fast resume. Change-Id: I7d92bca2685058db81312820471609409ddfdbbf Signed-off-by: Vivek Pernamitta --- drivers/bus/mhi/core/mhi_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/mhi/core/mhi_pm.c b/drivers/bus/mhi/core/mhi_pm.c index 49a425a6e374..2ce8ac472582 100644 --- a/drivers/bus/mhi/core/mhi_pm.c +++ b/drivers/bus/mhi/core/mhi_pm.c @@ -1521,6 +1521,8 @@ int mhi_pm_fast_resume(struct mhi_controller *mhi_cntrl, bool notify_client) /* check EP is in proper state */ if (mhi_cntrl->link_status(mhi_cntrl, mhi_cntrl->priv_data)) { MHI_ERR("Unable to access EP Config space\n"); + write_unlock_irq(&mhi_cntrl->pm_lock); + tasklet_enable(&mhi_cntrl->mhi_event->task); return -EIO; }