From 46cb3afd3962513345c6a964157fb7b35d014e70 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 29 Sep 2020 21:48:08 +0200 Subject: [PATCH] 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 --- drivers/mmc/sh_sdhi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.39.5