MA-16940 remove logically dead code
authorfaqiang.zhu <faqiang.zhu@nxp.com>
Thu, 16 Apr 2020 12:46:24 +0000 (20:46 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:18 +0000 (09:49 +0800)
boot_buf was used to point to the memory allocated in do_boota function
to save boot partition data. now boot partition is loaded by AVB, this
boot_buf should be removed.

Change-Id: I614c412b5f7ed980d29106b364a8193c56db13dc
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit 2a27f021798e31a8bab37804b053d2b9ebaea928)
(cherry picked from commit 4ae3275bb7065dfcf99dcdf559eaf99d044c51e0)

drivers/fastboot/fb_fsl/fb_fsl_boot.c

index cf4c538..8e7acd5 100644 (file)
@@ -548,7 +548,6 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
 
        ulong addr = 0;
        struct andr_img_hdr *hdr = NULL;
-       void *boot_buf = NULL;
        ulong image_size;
        u32 avb_metric;
        bool check_image_arm64 =  false;
@@ -852,8 +851,6 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
 
        if (avb_out_data != NULL)
                avb_slot_verify_data_free(avb_out_data);
-       if (boot_buf != NULL)
-               free(boot_buf);
 
        if (check_image_arm64) {
 #ifdef CONFIG_CMD_BOOTI