Message ID | 1587529175-27778-3-git-send-email-bbhatt@codeaurora.org |
---|---|
State | New |
Headers | show |
Series | Bug fixes and improved logging in MHI | expand |
diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c index 23154f1..ba8afa7 100644 --- a/drivers/bus/mhi/core/main.c +++ b/drivers/bus/mhi/core/main.c @@ -827,6 +827,9 @@ int mhi_process_data_event_ring(struct mhi_controller *mhi_cntrl, enum mhi_pkt_type type = MHI_TRE_GET_EV_TYPE(local_rp); chan = MHI_TRE_GET_EV_CHID(local_rp); + if (WARN_ON(chan >= mhi_cntrl->max_chan)) + continue; + mhi_chan = &mhi_cntrl->mhi_chan[chan]; if (likely(type == MHI_PKT_TYPE_TX_EVENT)) {