diff options
author | Steve Wilkins <steve.wilkins@raymarine.com> | 2024-08-09 14:47:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-04 13:30:16 +0200 |
commit | c9bcc056ec11f53985a6111f078bf7c0d5f66752 (patch) | |
tree | 21157361f4e3e4292d1c251341ad09f12c003470 | |
parent | ac36a8178b6b67aeef6933b6e5f7be5f20625804 (diff) |
firmware: microchip: fix incorrect error report of programming:timeout on success
[ Upstream commit 591940e22e287fb64ac07be275e343d860cb72d6 ]
After successfully programming the SPI flash with an MFPS auto update
image, the error sysfs attribute reports programming:timeout.
This is caused by an incorrect check on the return value from
wait_for_completion_timeout() in mpfs_auto_update_poll_complete().
Fixes: ec5b0f1193ad ("firmware: microchip: add PolarFire SoC Auto Update support")
Signed-off-by: Steve Wilkins <steve.wilkins@raymarine.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/firmware/microchip/mpfs-auto-update.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/microchip/mpfs-auto-update.c b/drivers/firmware/microchip/mpfs-auto-update.c index 835a19a7a3a0..4a95fbbf4733 100644 --- a/drivers/firmware/microchip/mpfs-auto-update.c +++ b/drivers/firmware/microchip/mpfs-auto-update.c @@ -153,7 +153,7 @@ static enum fw_upload_err mpfs_auto_update_poll_complete(struct fw_upload *fw_up */ ret = wait_for_completion_timeout(&priv->programming_complete, msecs_to_jiffies(AUTO_UPDATE_TIMEOUT_MS)); - if (ret) + if (!ret) return FW_UPLOAD_ERR_TIMEOUT; return FW_UPLOAD_ERR_NONE; |