diff options
author | Conor Dooley <conor.dooley@microchip.com> | 2024-04-10 12:58:05 +0100 |
---|---|---|
committer | Conor Dooley <conor.dooley@microchip.com> | 2024-04-24 22:02:20 +0100 |
commit | 6e3b7e862ea4e4ff1be1d153ae07dfe150ed8896 (patch) | |
tree | e326a4d9038f32bf0b73ec6354bbeda22891b2b0 /drivers/firmware/microchip | |
parent | 6b0856ee585d7f8a544546c3c5f1f4c49162e451 (diff) |
firmware: microchip: don't unconditionally print validation success
If validation fails, both prints are made. Skip the success one in the
failure case.
Fixes: ec5b0f1193ad ("firmware: microchip: add PolarFire SoC Auto Update support")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Diffstat (limited to 'drivers/firmware/microchip')
-rw-r--r-- | drivers/firmware/microchip/mpfs-auto-update.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/microchip/mpfs-auto-update.c b/drivers/firmware/microchip/mpfs-auto-update.c index fbeeaee4ac85..23134ffc4dfc 100644 --- a/drivers/firmware/microchip/mpfs-auto-update.c +++ b/drivers/firmware/microchip/mpfs-auto-update.c @@ -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); |