ARM: OMAP2+: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
authorXu Wang <vulab@iscas.ac.cn>
Wed, 4 Nov 2020 06:45:05 +0000 (06:45 +0000)
committerTony Lindgren <tony@atomide.com>
Thu, 19 Nov 2020 09:45:42 +0000 (11:45 +0200)
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/display.c

index 2000fca..6daaa64 100644 (file)
@@ -385,8 +385,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
        }
 
        for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
-               if (oc->_clk)
-                       clk_prepare_enable(oc->_clk);
+               clk_prepare_enable(oc->_clk);
 
        dispc_disable_outputs();
 
@@ -412,8 +411,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
                pr_debug("dss_core: softreset done\n");
 
        for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
-               if (oc->_clk)
-                       clk_disable_unprepare(oc->_clk);
+               clk_disable_unprepare(oc->_clk);
 
        r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0;