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

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

Merge "msm: mhi_dev: Added mutex lock in mhi_dev_write_channel"

parents 36d60ecc 24ebbc28
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3535,13 +3535,16 @@ int mhi_dev_write_channel(struct mhi_req *wreq)
		 * Expected usage is when there is a write
		 * to the MHI core -> notify SM.
		 */
		mutex_lock(&mhi_ctx->mhi_lock);
		mhi_log(MHI_MSG_CRITICAL, "Wakeup by chan:%d\n", ch->ch_id);
		rc = mhi_dev_notify_sm_event(MHI_DEV_EVENT_CORE_WAKEUP);
		if (rc) {
			pr_err("error sending core wakeup event\n");
			mutex_unlock(&mhi_ctx->mhi_lock);
			mutex_unlock(&mhi_ctx->mhi_write_test);
			return rc;
		}
		mutex_unlock(&mhi_ctx->mhi_lock);
	}

	while (atomic_read(&mhi_ctx->is_suspended) &&