aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-09-29 21:48:08 +0200
committerPeng Fan <peng.fan@nxp.com>2020-10-12 15:53:20 +0800
commit46cb3afd3962513345c6a964157fb7b35d014e70 (patch)
treef5bc6e5215fb905a9aa8ca3b45ac5b2629316ecb /drivers/mmc
parent4d6a773b1cfcb7e62d12dd31e588b5d00179b470 (diff)
downloadu-boot-46cb3afd3962513345c6a964157fb7b35d014e70.zip
u-boot-46cb3afd3962513345c6a964157fb7b35d014e70.tar.gz
u-boot-46cb3afd3962513345c6a964157fb7b35d014e70.tar.bz2
mmc: do not check argument of free() beforehand
free() checks if its argument in NULL. No need to check it twice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/sh_sdhi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 315f95c..29f83b6 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -784,8 +784,7 @@ int sh_sdhi_init(unsigned long addr, int ch, unsigned long quirks)
return ret;
error:
- if (host)
- free(host);
+ free(host);
return ret;
}