mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
mhi: core: Check for pm error state before asserting dev wake
After calling remove call back in mhi_pm_disable_transition there is possibility of MHI client calling mhi_device_get_sync which increments dev wake. This results in to MHI ASSERT due to non zero dev wake count. Fix this issue by checking pm error state before incrementing dev wake count. Change-Id: I817d571f210b77aef444a7ae1f9b2cc5af057ab2 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
5918bdca37
commit
c006fd5f9f
1 changed files with 5 additions and 0 deletions
|
|
@ -1493,6 +1493,11 @@ int __mhi_device_get_sync(struct mhi_controller *mhi_cntrl)
|
|||
int ret;
|
||||
|
||||
read_lock_bh(&mhi_cntrl->pm_lock);
|
||||
if (MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state)) {
|
||||
read_unlock_bh(&mhi_cntrl->pm_lock);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
mhi_cntrl->wake_get(mhi_cntrl, true);
|
||||
if (MHI_PM_IN_SUSPEND_STATE(mhi_cntrl->pm_state))
|
||||
mhi_trigger_resume(mhi_cntrl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue