lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/4] clk: renesas: cpg-mssr: Check return value of pm_genpd_init()
From
Date
On 11/18/21 6:29 PM, Geert Uytterhoeven wrote:

[...]
>> Make sure we check the return value of pm_genpd_init() which might fail.
>> Also add a devres action to remove the power-domain in-case the probe
>> callback fails further down in the code flow.
>>
>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-clk-for-v5.17.
>
>> @@ -574,7 +580,13 @@ static int __init cpg_mssr_add_clk_domain(struct device *dev,
>> GENPD_FLAG_ACTIVE_WAKEUP;
>> genpd->attach_dev = cpg_mssr_attach_dev;
>> genpd->detach_dev = cpg_mssr_detach_dev;
>> - pm_genpd_init(genpd, &pm_domain_always_on_gov, false);
>> + ret = pm_genpd_init(genpd, &pm_domain_always_on_gov, false);
>> + if (ret)
>> + return ret;
>> + ret = devm_add_action_or_reset(dev, cpg_mssr_genpd_remove, genpd);
>
> Will insert a blank line here.

You mean after *return*? Else I don't think we need an empty line. :-)

>
>> + if (ret)
>> + return ret;
>> +
>> cpg_mssr_clk_domain = pd;
>>
>> of_genpd_add_provider_simple(np, genpd);
>
> Gr{oetje,eeting}s,
>
> Geert

MBR, Sergey

\
 
 \ /
  Last update: 2021-11-18 18:44    [W:0.097 / U:1.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site