From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] regulator: uniphier: Fix probe error handling
Date: Wed, 30 Jan 2019 18:05:27 +0900 [thread overview]
Message-ID: <20190130180526.4DE9.4A936039@socionext.com> (raw)
In-Reply-To: <20190130071110.26050-1-axel.lin@ingics.com>
Hi Axel,
On Wed, 30 Jan 2019 15:11:09 +0800 <axel.lin@ingics.com> wrote:
> Ensure unwind all resources if probe fails.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/regulator/uniphier-regulator.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/regulator/uniphier-regulator.c b/drivers/regulator/uniphier-regulator.c
> index abf22acbd13e..6ba0ae405f2b 100644
> --- a/drivers/regulator/uniphier-regulator.c
> +++ b/drivers/regulator/uniphier-regulator.c
> @@ -87,8 +87,10 @@ static int uniphier_regulator_probe(struct platform_device *pdev)
> }
>
> regmap = devm_regmap_init_mmio(dev, base, priv->data->regconf);
> - if (IS_ERR(regmap))
> - return PTR_ERR(regmap);
> + if (IS_ERR(regmap)) {
> + ret = PTR_ERR(regmap);
> + goto out_rst_assert;
> + }
Surely this return without asserting resets is wrong. This looks good to me.
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Thank you,
---
Best Regards,
Kunihiko Hayashi
prev parent reply other threads:[~2019-01-30 9:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 7:11 Axel Lin
2019-01-30 7:11 ` [PATCH 2/2] regulator: uniphier: Constify uniphier_regulator_ops Axel Lin
2019-01-30 9:06 ` Kunihiko Hayashi
2019-01-30 9:05 ` Kunihiko Hayashi [this message]
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=20190130180526.4DE9.4A936039@socionext.com \
--to=hayashi.kunihiko@socionext.com \
--cc=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®