clk: mmp: pxa910: fix return value check in pxa910_clk_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 17 Sep 2016 15:55:56 +0000 (15:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2016 08:54:53 +0000 (09:54 +0100)
commit 10f2bfb092e3b49000526c02cfe8b2abbbdbb752 upstream.

Fix the retrn value check which testing the wrong variable
in pxa910_clk_init().

Fixes: 2bc61da9f7ff ("clk: mmp: add pxa910 DT support for clock driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/mmp/clk-of-pxa910.c

index 13d6173326a435ad46af652f27bfc20e32302e04..cdf5ba566d3b90b9d15ff8e361971a281c61c4a0 100644 (file)
@@ -282,7 +282,7 @@ static void __init pxa910_clk_init(struct device_node *np)
        }
 
        pxa_unit->apmu_base = of_iomap(np, 1);
-       if (!pxa_unit->mpmu_base) {
+       if (!pxa_unit->apmu_base) {
                pr_err("failed to map apmu registers\n");
                return;
        }
@@ -294,7 +294,7 @@ static void __init pxa910_clk_init(struct device_node *np)
        }
 
        pxa_unit->apbcp_base = of_iomap(np, 3);
-       if (!pxa_unit->mpmu_base) {
+       if (!pxa_unit->apbcp_base) {
                pr_err("failed to map apbcp registers\n");
                return;
        }