soc: rockchip: power-domain: check the existing of regmap
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 15 Feb 2016 03:33:57 +0000 (11:33 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Tue, 12 Apr 2016 01:28:08 +0000 (03:28 +0200)
Check return value of syscon_node_to_regmap for
rockchip_pm_domain_probe. If err value is returned, probe
procedure should abort.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/soc/rockchip/pm_domains.c

index 2116131528f73e1d3713f58a9549e5950af268ce..ac729fe42cc91c4b23c4f59c866507d1512ce720 100644 (file)
@@ -475,6 +475,10 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
        }
 
        pmu->regmap = syscon_node_to_regmap(parent->of_node);
+       if (IS_ERR(pmu->regmap)) {
+               dev_err(dev, "no regmap available\n");
+               return PTR_ERR(pmu->regmap);
+       }
 
        /*
         * Configure power up and down transition delays for CORE