Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334126 > unrolled thread

[PATCH 6/6] soc: rockchip: power-domain: check the existing of regmap

Started byShawn Lin <shawn.lin@rock-chips.com>
First post2016-02-15 04:40 +0100
Last post2016-02-15 22:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 6/6] soc: rockchip: power-domain: check the existing of regmap Shawn Lin <shawn.lin@rock-chips.com> - 2016-02-15 04:40 +0100
    Re: [PATCH 6/6] soc: rockchip: power-domain: check the existing of regmap Heiko Stuebner <heiko@sntech.de> - 2016-02-15 22:30 +0100

#1334126 — [PATCH 6/6] soc: rockchip: power-domain: check the existing of regmap

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-02-15 04:40 +0100
Subject[PATCH 6/6] soc: rockchip: power-domain: check the existing of regmap
Message-ID<r2ib0-3Gn-21@gated-at.bofh.it>
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>
---

 drivers/soc/rockchip/pm_domains.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 534c589..3c4a44d 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -402,6 +402,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 -ENODEV;
+	}
 
 	/*
 	 * Configure power up and down transition delays for CORE
-- 
2.3.7

[toc] | [next] | [standalone]


#1334839

FromHeiko Stuebner <heiko@sntech.de>
Date2016-02-15 22:30 +0100
Message-ID<r2ySu-6FY-11@gated-at.bofh.it>
In reply to#1334126
Am Montag, 15. Februar 2016, 11:33:57 schrieb Shawn Lin:
> 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>

applied to my armsoc/drivers branch for 4.6 with one change below

> ---
> 
>  drivers/soc/rockchip/pm_domains.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/soc/rockchip/pm_domains.c
> b/drivers/soc/rockchip/pm_domains.c index 534c589..3c4a44d 100644
> --- a/drivers/soc/rockchip/pm_domains.c
> +++ b/drivers/soc/rockchip/pm_domains.c
> @@ -402,6 +402,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 -ENODEV;

Instead of returning ENODEV I did go with

		return PTR_ERR(pmu->regmap);

the error from trying to grab the regmap.


Heiko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web