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

Commit 5de2f678 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: Add checks for bhie offsets"

parents 4797a4f1 ea9e195f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1776,6 +1776,13 @@ int mhi_prepare_for_power_up(struct mhi_controller *mhi_cntrl)
				goto bhie_error;
			}

			if (bhie_off >= mhi_cntrl->len) {
				MHI_ERR("Invalid BHIE=0x%x  len=0x%x\n",
					bhie_off, mhi_cntrl->len);
				ret = -EINVAL;
				goto bhie_error;
			}

			mhi_cntrl->bhie = mhi_cntrl->regs + bhie_off;
		}