UPSTREAM: clk: rockchip: fix cpuclk registration error handling
authorXing Zheng <zhengxing@rock-chips.com>
Thu, 26 May 2016 13:49:08 +0000 (21:49 +0800)
committerXing Zheng <zhengxing@rock-chips.com>
Fri, 27 May 2016 12:07:02 +0000 (20:07 +0800)
It maybe due to a copy-paste error the error handing should be
cclk not clk when checking if the cpuclk registration succeeded.

Reported-by: Lin Huang <lin.huang@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/fixes commit df43cf8f1c116f26fcfd89ce9b1119929c732597)

Change-Id: I7d21808194c914e9117c498309e4b69861799318
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
drivers/clk/rockchip/clk-cpu.c

index 2ce5e71102d40e0f4e8749feefee49c96190fba7..4b366a3691a4f08091afeb46f26073280e04728b 100644 (file)
@@ -321,9 +321,9 @@ struct clk *rockchip_clk_register_cpuclk(const char *name,
        }
 
        cclk = clk_register(NULL, &cpuclk->hw);
-       if (IS_ERR(clk)) {
+       if (IS_ERR(cclk)) {
                pr_err("%s: could not register cpuclk %s\n", __func__,  name);
-               ret = PTR_ERR(clk);
+               ret = PTR_ERR(cclk);
                goto free_rate_table;
        }