lkml.org 
[lkml]   [2016]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 6/6] soc: rockchip: power-domain: check the existing of regmap
Date
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

\
 
 \ /
  Last update: 2016-02-15 22:41    [W:0.057 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site