mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
drivers: qe: avoid double free()
Avoid calling free(addr) twice if the device for ucode is not found. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
f11b38e3ae
commit
80b1ef942d
1 changed files with 0 additions and 1 deletions
|
@ -288,7 +288,6 @@ void u_qe_init(void)
|
||||||
struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
|
struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
|
||||||
|
|
||||||
if (!mmc) {
|
if (!mmc) {
|
||||||
free(addr);
|
|
||||||
printf("\nMMC cannot find device for ucode\n");
|
printf("\nMMC cannot find device for ucode\n");
|
||||||
} else {
|
} else {
|
||||||
printf("\nMMC read: dev # %u, block # %u, count %u ...\n",
|
printf("\nMMC read: dev # %u, block # %u, count %u ...\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue