summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/microchip/mpfs-auto-update.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/microchip/mpfs-auto-update.c')
-rw-r--r--drivers/firmware/microchip/mpfs-auto-update.c2
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 fbeeaee4ac..23134ffc4d 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);