From: Shawn Lin Date: Sat, 12 Mar 2016 16:25:53 +0000 (+0800) Subject: clk: rockchip: remove redundant checking of device_node X-Git-Tag: android-x86-7.1-r1~1441^2~4^2~19 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ff1ae209617cb31a5297bd103709d6b9e2db77d2;p=android-x86%2Fkernel.git clk: rockchip: remove redundant checking of device_node rockchip_clk_of_add_provider is used by sub-clk driver which already call of_iomap before calling it. If device_node does not exist, of_iomap returns NULL which will fail to init the sub-clk driver. So really it's redundant. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner --- diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c index 5618a8761dee..277f9270bf72 100644 --- a/drivers/clk/rockchip/clk.c +++ b/drivers/clk/rockchip/clk.c @@ -359,11 +359,9 @@ err_free: void __init rockchip_clk_of_add_provider(struct device_node *np, struct rockchip_clk_provider *ctx) { - if (np) { - if (of_clk_add_provider(np, of_clk_src_onecell_get, - &ctx->clk_data)) - pr_err("%s: could not register clk provider\n", __func__); - } + if (of_clk_add_provider(np, of_clk_src_onecell_get, + &ctx->clk_data)) + pr_err("%s: could not register clk provider\n", __func__); } struct regmap *rockchip_clk_get_grf(struct rockchip_clk_provider *ctx)