From: Shawn Lin Date: Sat, 12 Mar 2016 16:25:53 +0000 (+0800) Subject: UPSTREAM: clk: rockchip: remove redundant checking of device_node X-Git-Tag: firefly_0821_release~3193 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=firefly-linux-kernel-4.4.55.git;a=commitdiff_plain;h=d73b398d05567232fb2d6c599f502c318db0a71c UPSTREAM: 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 (cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-clk/next commit a96edf5a5243e1bdf642492b783221aa498f1e49) Change-Id: I9a51ed269fe26742da2ae84d99cf9689f49add1b Signed-off-by: Xing Zheng --- diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c index 3f9cbb760423..c5fd146c8cf2 100644 --- a/drivers/clk/rockchip/clk.c +++ b/drivers/clk/rockchip/clk.c @@ -354,11 +354,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)