mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
bus: mhi: host: Prevent warnings on clearing channel context twice
Do not allow clearing the channel context twice from mhi_driver_remove(), if already done before disable transition is initiated. This prevents kernel warnings such as "trying to free invalid coherent area" from occurring. Change-Id: I85dec0557a287c9207b56d2b2243d53b6a40ff1c Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org> Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit is contained in:
parent
21f3a2eb36
commit
d3dd2a1713
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -1359,6 +1359,7 @@ static int mhi_driver_remove(struct device *dev)
|
|||
|
||||
if ((ch_state[dir] == MHI_CH_STATE_ENABLED ||
|
||||
ch_state[dir] == MHI_CH_STATE_STOP) &&
|
||||
mhi_chan->ch_state != MHI_CH_STATE_DISABLED &&
|
||||
!mhi_chan->offload_ch)
|
||||
mhi_deinit_chan_ctxt(mhi_cntrl, mhi_chan);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user