bus: mhi: host: Use ERANGE for BHIOFF/BHIEOFF range check
authorJeffrey Hugo <quic_jhugo@quicinc.com>
Fri, 24 Mar 2023 16:21:00 +0000 (10:21 -0600)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 3 Apr 2023 05:18:17 +0000 (10:48 +0530)
commit446271e5d7bcb5f1c70bc35b11abbd92e6bb4378
tree5ad2d6d8bec10d2ae54734c95dab8fb1395cfd0a
parent6a0c637bfee69a74c104468544d9f2a6579626d0
bus: mhi: host: Use ERANGE for BHIOFF/BHIEOFF range check

If the BHIOFF or BHIEOFF range checks fail, they return EINVAL.  ERANGE
is a better error code since it implies an out of range condition.

Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/1679674860-28229-1-git-send-email-quic_jhugo@quicinc.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/host/init.c