mmc: fsl_esdhc_spl: remove superfluous free()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 27 Dec 2020 09:50:26 +0000 (10:50 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 18 Jan 2021 20:23:06 +0000 (15:23 -0500)
Freeing a buffer before calling hang() is superfluous. Removing the call
reduces the SPL size.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/fsl_esdhc_spl.c

index afe55fa..bee7657 100644 (file)
@@ -91,20 +91,17 @@ void __noreturn mmc_boot(void)
                                        CONFIG_CFG_DATA_SECTOR, 1, tmp_buf);
        if (err != 1) {
                puts("spl: mmc read failed!!\n");
-               free(tmp_buf);
                hang();
        }
 
        val = *(tmp_buf + MBRDBR_BOOT_SIG_55);
        if (0x55 != val) {
                puts("spl: mmc signature is not valid!!\n");
-               free(tmp_buf);
                hang();
        }
        val = *(tmp_buf + MBRDBR_BOOT_SIG_AA);
        if (0xAA != val) {
                puts("spl: mmc signature is not valid!!\n");
-               free(tmp_buf);
                hang();
        }