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

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

Merge "mhi: core: unlink MHI device from MHI chan during device release"

parents 2364d180 5fa7b531
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -1303,6 +1303,12 @@ static void mhi_release_device(struct device *dev)
{
{
	struct mhi_device *mhi_dev = to_mhi_device(dev);
	struct mhi_device *mhi_dev = to_mhi_device(dev);


	if (mhi_dev->ul_chan)
		mhi_dev->ul_chan->mhi_dev = NULL;

	if (mhi_dev->dl_chan)
		mhi_dev->dl_chan->mhi_dev = NULL;

	kfree(mhi_dev);
	kfree(mhi_dev);
}
}


@@ -1441,9 +1447,6 @@ static int mhi_driver_remove(struct device *dev)


		mhi_chan->ch_state = MHI_CH_STATE_DISABLED;
		mhi_chan->ch_state = MHI_CH_STATE_DISABLED;


		/* remove associated device */
		mhi_chan->mhi_dev = NULL;

		mutex_unlock(&mhi_chan->mutex);
		mutex_unlock(&mhi_chan->mutex);
	}
	}