aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2020-11-04 10:56:20 +0100
committerLoic Poulain <loic.poulain@linaro.org>2020-12-01 09:19:25 +0100
commit17bbafd3856ae90422fcd6fa9a616966afe203b3 (patch)
tree7077ba8dfa193871aeacfcfe360632802b1247c0
parenta1d5ac697ec9da1fabe704e5870d0521964c4de8 (diff)
Revert "bus: mhi: Fix channel close issue on driver remove"
This reverts commit f988f5c354a3947866343e5bcf662d62cd30b3ec. This cause double page free on mhi_pci_generic remove. In unprepare (called by the driver) and in unit channel loop. Fix that in a proper way.
-rw-r--r--drivers/bus/mhi/core/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c
index 73b19dda82bb..f3287faf2243 100644
--- a/drivers/bus/mhi/core/main.c
+++ b/drivers/bus/mhi/core/main.c
@@ -1236,8 +1236,7 @@ static void __mhi_unprepare_channel(struct mhi_controller *mhi_cntrl,
/* no more processing events for this channel */
mutex_lock(&mhi_chan->mutex);
write_lock_irq(&mhi_chan->lock);
- if (mhi_chan->ch_state != MHI_CH_STATE_ENABLED &&
- mhi_chan->ch_state != MHI_CH_STATE_SUSPENDED) {
+ if (mhi_chan->ch_state != MHI_CH_STATE_ENABLED) {
write_unlock_irq(&mhi_chan->lock);
mutex_unlock(&mhi_chan->mutex);
return;