linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: neil.armstrong@linaro.org
To: ye.xingchen@zte.com.cn
Cc: khilman@baylibre.com, jbrunet@baylibre.com,
	martin.blumenstingl@googlemail.com,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: amlogic: meson-pwrc: Use dev_err_probe()
Date: Fri, 24 Mar 2023 11:12:03 +0100	[thread overview]
Message-ID: <33c039ff-2702-e058-262a-829199fefa21@linaro.org> (raw)
In-Reply-To: <202303241016261854322@zte.com.cn>

On 24/03/2023 03:16, ye.xingchen@zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
> ---
>   drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> index 312fd9afccb0..5d4f12800d93 100644
> --- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> +++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> @@ -308,11 +308,9 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev)
>   	}
> 
>   	rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
> -	if (IS_ERR(rstc)) {
> -		if (PTR_ERR(rstc) != -EPROBE_DEFER)
> -			dev_err(&pdev->dev, "failed to get reset lines\n");
> -		return PTR_ERR(rstc);
> -	}
> +	if (IS_ERR(rstc))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(rstc),
> +				     "failed to get reset lines\n");
> 
>   	vpu_clk = devm_clk_get(&pdev->dev, "vpu");
>   	if (IS_ERR(vpu_clk)) {

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2023-03-24 10:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24  2:16 [PATCH] soc: amlogic: meson-pwrc: Use dev_err_probe() ye.xingchen
2023-03-24 10:12 ` neil.armstrong [this message]
2023-03-25 13:23 ` Martin Blumenstingl
2023-03-27  7:50 ` Neil Armstrong

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=33c039ff-2702-e058-262a-829199fefa21@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=ye.xingchen@zte.com.cn \
    /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;
as well as URLs for NNTP newsgroup(s).