lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33c039ff-2702-e058-262a-829199fefa21@linaro.org>
Date:   Fri, 24 Mar 2023 11:12:03 +0100
From:   neil.armstrong@...aro.org
To:     ye.xingchen@....com.cn
Cc:     khilman@...libre.com, jbrunet@...libre.com,
        martin.blumenstingl@...glemail.com,
        linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc: amlogic: meson-pwrc: Use dev_err_probe()

On 24/03/2023 03:16, ye.xingchen@....com.cn wrote:
> From: Ye Xingchen <ye.xingchen@....com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Ye Xingchen <ye.xingchen@....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@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ