spl: fit: do not check argument of free()
PATCH 1/1 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 <[email protected]>
--- common/spl/spl_fit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
common/spl/spl_fit.c +1 -2
@@ -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; }
--
2.25.1
PATCH 1/1 spl: fit: do not check argument of free()
Quoted 4 lines · Heinrich Schuchardt
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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200426/8d0aa3a3/attachment.sig>