OSDN Git Service

clk: rockchip: Remove redundant null check before clk_prepare_enable
authorXu Wang <vulab@iscas.ac.cn>
Fri, 27 Nov 2020 09:05:51 +0000 (09:05 +0000)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 29 Nov 2020 19:02:58 +0000 (20:02 +0100)
Because clk_prepare_enable() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20201127090551.50254-1-vulab@iscas.ac.cn
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/clk/rockchip/clk.c

index b443169..336481b 100644 (file)
@@ -603,8 +603,7 @@ void rockchip_clk_protect_critical(const char *const clocks[],
        for (i = 0; i < nclocks; i++) {
                struct clk *clk = __clk_lookup(clocks[i]);
 
-               if (clk)
-                       clk_prepare_enable(clk);
+               clk_prepare_enable(clk);
        }
 }
 EXPORT_SYMBOL_GPL(rockchip_clk_protect_critical);