[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201127090551.50254-1-vulab@iscas.ac.cn>
Date: Fri, 27 Nov 2020 09:05:51 +0000
From: Xu Wang <vulab@...as.ac.cn>
To: mturquette@...libre.com, sboyd@...nel.org, heiko@...ech.de,
linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable
Because clk_prepare_enable() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@...as.ac.cn>
---
drivers/clk/rockchip/clk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index b443169dd408..336481bc6cc7 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -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);
--
2.17.1
Powered by blists - more mailing lists