From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Jiri Kosina <trivial@kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
linux-clk <linux-clk@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Prabhakar <prabhakar.csengg@gmail.com>,
Biju Das <biju.das.jz@bp.renesas.com>
Subject: Re: [PATCH 3/4] clk: renesas: cpg-mssr: Check return value of pm_genpd_init()
Date: Thu, 18 Nov 2021 20:44:04 +0300 [thread overview]
Message-ID: <a427dace-171d-3cf7-ece6-ea7b15d586d0@omp.ru> (raw)
In-Reply-To: <CAMuHMdUi_Aj6JQ5n31R3DROUMG8F+032+L43AMmkiBwB_TQhWw@mail.gmail.com>
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
next prev parent reply other threads:[~2021-11-18 17:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 11:50 [PATCH 0/4] clk: renesas: trivial fixes Lad Prabhakar
2021-11-17 11:50 ` [PATCH 1/4] clk: renesas: rzg2l: Check return value of pm_genpd_init() Lad Prabhakar
2021-11-18 15:25 ` Geert Uytterhoeven
2021-11-18 15:27 ` Geert Uytterhoeven
2021-11-17 11:50 ` [PATCH 2/4] clk: renesas: rzg2l: propagate return value of_genpd_add_provider_simple() Lad Prabhakar
2021-11-18 15:26 ` Geert Uytterhoeven
2021-11-18 15:26 ` Geert Uytterhoeven
2021-11-17 11:51 ` [PATCH 3/4] clk: renesas: cpg-mssr: Check return value of pm_genpd_init() Lad Prabhakar
2021-11-18 15:29 ` Geert Uytterhoeven
2021-11-18 17:44 ` Sergey Shtylyov [this message]
2021-11-18 17:46 ` Geert Uytterhoeven
2021-11-17 11:51 ` [PATCH 4/4] clk: renesas: cpg-mssr: propagate return value of_genpd_add_provider_simple() Lad Prabhakar
2021-11-18 15:30 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a427dace-171d-3cf7-ece6-ea7b15d586d0@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=biju.das.jz@bp.renesas.com \
--cc=geert@linux-m68k.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=sboyd@kernel.org \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox