mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Merge "mhi: core: Add checks for bhie offsets"
This commit is contained in:
commit
8c0cae110c
1 changed files with 7 additions and 0 deletions
|
|
@ -1796,6 +1796,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue