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

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

Merge "msm: mhi-dev: Check to avoid null pointer dereference"

parents e2f066d9 0b5165ee
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2359,9 +2359,8 @@ static int mhi_dev_abort(struct mhi_dev *mhi)
	/* Hard stop all the channels */
	for (ch_id = 0; ch_id < mhi->cfg.channels; ch_id++) {
		ring = &mhi->ring[ch_id + mhi->ch_ring_start];
		if (ring->state == RING_STATE_UINT)
		if (!ring || ring->state == RING_STATE_UINT)
			continue;

		ch = &mhi->ch[ch_id];
		mutex_lock(&ch->ch_lock);
		mhi->ch[ch_id].state = MHI_DEV_CH_STOPPED;