free() checks if its argument in NULL. No need to check it twice.

Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---
 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.28.0

Reply via email to