summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-07-12 16:15:15 +0800
committerMike Turquette <mturquette@linaro.org>2013-08-08 15:57:27 -0700
commitee85e9bd25773a30002769c8121b6ae62f23f2b4 (patch)
tree4ad1a05ed33736f4255f7e36e2097d4aec3f1644 /drivers/clk/sunxi
parent5cfe9614f365915d9e75d110d4008b06a5c0b99e (diff)
downloadblackbird-op-linux-ee85e9bd25773a30002769c8121b6ae62f23f2b4.tar.gz
blackbird-op-linux-ee85e9bd25773a30002769c8121b6ae62f23f2b4.zip
clk: sunxi: Fix checking return value of clk_register_[composite|factors]
clk_register_composite() and clk_register_factors() return ERR_PTR on error. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/sunxi')
-rw-r--r--drivers/clk/sunxi/clk-sunxi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 412912bbba53..02e440beb3d3 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -64,7 +64,7 @@ static void __init sunxi_osc_clk_setup(struct device_node *node)
&gate->hw, &clk_gate_ops,
CLK_IS_ROOT);
- if (clk) {
+ if (!IS_ERR(clk)) {
of_clk_add_provider(node, of_clk_src_simple_get, clk);
clk_register_clkdev(clk, clk_name, NULL);
}
@@ -221,7 +221,7 @@ static void __init sunxi_factors_clk_setup(struct device_node *node,
clk = clk_register_factors(NULL, clk_name, parent, 0, reg,
data->table, data->getter, &clk_lock);
- if (clk) {
+ if (!IS_ERR(clk)) {
of_clk_add_provider(node, of_clk_src_simple_get, clk);
clk_register_clkdev(clk, clk_name, NULL);
}
OpenPOWER on IntegriCloud