From: Heinrich Schuchardt Date: Tue, 29 Sep 2020 19:48:08 +0000 (+0200) Subject: mmc: do not check argument of free() beforehand X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=46cb3afd3962513345c6a964157fb7b35d014e70;p=u-boot.git 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 --- diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c index 315f95cce8..29f83b6554 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; }