diff options
author | Jeffrey Hugo <jhugo@codeaurora.org> | 2021-02-12 14:27:23 -0700 |
---|---|---|
committer | Loic Poulain <loic.poulain@linaro.org> | 2021-03-01 16:49:02 +0100 |
commit | 573ab509a7ab7aa99181fee5ee3c888fd8c201e3 (patch) | |
tree | 098ad21fe640e657a207829b707ca3603c2063bb | |
parent | ed7c7fe74e1d28dd565d3a640614d4ad4aec8464 (diff) |
bus: mhi: core: Fix check for syserr at power_up
The check to see if we have reset the device after detecting syserr at
power_up is inverted. wait_for_event_timeout() returns 0 on failure,
and a positive value on success. The check is looking for non-zero
as a failure, which is likely to incorrectly cause a device init failure
if syserr was detected at power_up. Fix this.
Fixes: e18d4e9fa79b ("bus: mhi: core: Handle syserr during power_up")
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
-rw-r--r-- | drivers/bus/mhi/core/pm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c index 625bf581ce2f..b3ed4636264b 100644 --- a/drivers/bus/mhi/core/pm.c +++ b/drivers/bus/mhi/core/pm.c @@ -1092,7 +1092,7 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl) &val) || !val, msecs_to_jiffies(mhi_cntrl->timeout_ms)); - if (ret) { + if (!ret) { ret = -EIO; dev_info(dev, "Failed to reset MHI due to syserr state\n"); goto error_bhi_offset; |