]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: kendryte: no need to check argument of free()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 29 Sep 2020 19:52:12 +0000 (21:52 +0200)
committerAndes <uboot@andestech.com>
Mon, 26 Oct 2020 01:27:13 +0000 (09:27 +0800)
free() checks if its argument is NULL. No need to check it twice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
drivers/clk/kendryte/clk.c

index bb196961afd0d47ce44c1e37af031783b5f52019..4b959401a63d655a9a6cc8c770b0c392efb75359 100644 (file)
@@ -471,8 +471,7 @@ cleanup_gate:
 cleanup_div:
        free(div);
 cleanup_mux:
-       if (mux)
-               free(mux);
+       free(mux);
        return comp;
 }