From: Heinrich Schuchardt Date: Mon, 20 Apr 2020 10:44:01 +0000 (+0200) Subject: spl: fit: do not check argument of free() X-Git-Tag: v2020.07-rc1~14^2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=077e72c6e6266a215cdbb8bfb07d791cb9c070ec;p=oweals%2Fu-boot.git spl: fit: do not check argument of free() The free() function checks if its argument is NULL. It is superfluous to do the same check on the calling side. Signed-off-by: Heinrich Schuchardt --- diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 69dabd27f6..c51e4beb1c 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -425,8 +425,7 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image, debug("%s: DT overlay %s applied\n", __func__, fit_get_name(fit, node, NULL)); } - if (tmpbuffer) - free(tmpbuffer); + free(tmpbuffer); if (ret) return ret; }