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 bb19696..4b95940 100644 (file)
@@ -471,8 +471,7 @@ cleanup_gate:
 cleanup_div:
        free(div);
 cleanup_mux:
-       if (mux)
-               free(mux);
+       free(mux);
        return comp;
 }