]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: spl_imx_container: Delete uninitialized variable
authorYe Li <ye.li@nxp.com>
Wed, 23 Jul 2025 18:00:16 +0000 (15:00 -0300)
committerFabio Estevam <festevam@gmail.com>
Thu, 24 Jul 2025 11:00:47 +0000 (08:00 -0300)
The 'overhead' variable is uninitialized and actually shall not be used.
Delete it to fix coverity CID 37041718 - Uninitialized scalar variable.

Fixes: 73c40fcb7367 ("spl: Refactor spl_load_info->read to use units of bytes")
Reported-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Andrew Goodbody <andrew.goodbody@linaro.org>
common/spl/spl_imx_container.c

index b3565efb225ad83b5b25c959b75c268de5c03c55..79d021f81dcd3c513115d1c828049c52a2a14c20 100644 (file)
@@ -31,7 +31,7 @@ static struct boot_img_t *read_auth_image(struct spl_image_info *spl_image,
                                          ulong container_offset)
 {
        struct boot_img_t *images;
-       ulong offset, overhead, size;
+       ulong offset, size;
        void *buf, *trampoline;
 
        if (image_index > container->num_images) {
@@ -54,7 +54,7 @@ static struct boot_img_t *read_auth_image(struct spl_image_info *spl_image,
        debug("%s: container: %p offset: %lu size: %lu\n", __func__,
              container, offset, size);
 
-       buf = map_sysmem(images[image_index].dst - overhead, images[image_index].size);
+       buf = map_sysmem(images[image_index].dst, images[image_index].size);
        if (IS_ENABLED(CONFIG_SPL_IMX_CONTAINER_USE_TRAMPOLINE) &&
            arch_check_dst_in_secure(buf, size)) {
                trampoline = arch_get_container_trampoline();