Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9393454e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: Check for pm error state before asserting dev wake"

parents 347ace73 09a9f714
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1500,6 +1500,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);