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

Commit baa32b01 authored by Manu Gautam's avatar Manu Gautam
Browse files

mhi: core: Fix return value when checking bhi/e offsets



Return error if BHI or BHIe offsets are incorrect.

Change-Id: Ibd5b1a2acb70663b9dca3a68c87e2681910754c6
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 52405db9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -975,6 +975,7 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl)
	if (val >= mhi_cntrl->len) {
		write_unlock_irq(&mhi_cntrl->pm_lock);
		MHI_ERR("Invalid bhi offset:%x\n", val);
		ret = -EINVAL;
		goto error_bhi_offset;
	}

@@ -992,6 +993,7 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl)
		if (val >= mhi_cntrl->len) {
			write_unlock_irq(&mhi_cntrl->pm_lock);
			MHI_ERR("Invalid bhie offset:%x\n", val);
			ret = -EINVAL;
			goto error_bhi_offset;
		}