Skip to content

Commit 591940e

Browse files
swilkins-raymarineConchuOD
authored andcommitted
firmware: microchip: fix incorrect error report of programming:timeout on success
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: ec5b0f1 ("firmware: microchip: add PolarFire SoC Auto Update support") Signed-off-by: Steve Wilkins <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent 8400291 commit 591940e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/microchip/mpfs-auto-update.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static enum fw_upload_err mpfs_auto_update_poll_complete(struct fw_upload *fw_up
166166
*/
167167
ret = wait_for_completion_timeout(&priv->programming_complete,
168168
msecs_to_jiffies(AUTO_UPDATE_TIMEOUT_MS));
169-
if (ret)
169+
if (!ret)
170170
return FW_UPLOAD_ERR_TIMEOUT;
171171

172172
return FW_UPLOAD_ERR_NONE;

0 commit comments

Comments
 (0)