Skip to content

Commit

Permalink
firmware: microchip: don't unconditionally print validation success
Browse files Browse the repository at this point in the history
If validation fails, both prints are made. Skip the success one in the
failure case.

Fixes: ec5b0f1 ("firmware: microchip: add PolarFire SoC Auto Update support")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
  • Loading branch information
Conor Dooley committed Apr 24, 2024
1 parent 6b0856e commit 6e3b7e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/firmware/microchip/mpfs-auto-update.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ static int mpfs_auto_update_verify_image(struct fw_upload *fw_uploader)
if (ret | response->resp_status) {
dev_warn(priv->dev, "Verification of Upgrade Image failed!\n");
ret = ret ? ret : -EBADMSG;
goto free_message;
}

dev_info(priv->dev, "Verification of Upgrade Image passed!\n");

free_message:
devm_kfree(priv->dev, message);
free_response:
devm_kfree(priv->dev, response);
Expand Down

0 comments on commit 6e3b7e8

Please sign in to comment.