Merge "msm: mhi_dev: Adding check for event ring"

This commit is contained in:
qctecmdr 2022-02-28 06:04:58 -08:00 • committed by Gerrit - the friendly Code Review server
commit 62da00618b

View file

@ -466,6 +466,11 @@ static int mhi_dev_send_multiple_tr_events(struct mhi_dev *mhi, int evnt_ring,
return -EINVAL;
}
if (!ring) {
pr_err("%s(): Ring %d not present\n", __func__, evnt_ring_idx);
return -EINVAL;
}
ctx = (union mhi_dev_ring_ctx *)&mhi->ev_ctx_cache[evnt_ring];
if (mhi_ring_get_state(ring) == RING_STATE_UINT) {