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: <cd527a86-167c-495a-9bbd-0b37978bc842@foss.st.com>
Date: Wed, 14 Aug 2024 17:44:48 +0200
From: Patrice CHOTARD <patrice.chotard@...s.st.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Thinh Nguyen
	<Thinh.Nguyen@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam
	<festevam@...il.com>,
        Michal Simek <michal.simek@....com>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <imx@...ts.linux.dev>,
        <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH 02/11] usb: dwc3: st: simplify with dev_err_probe



On 8/14/24 12:35, Krzysztof Kozlowski wrote:
> Use dev_err_probe() to make the error paths a bit simpler.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
>  drivers/usb/dwc3/dwc3-st.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
> index 98f43d7082d7..7a0b1821768a 100644
> --- a/drivers/usb/dwc3/dwc3-st.c
> +++ b/drivers/usb/dwc3/dwc3-st.c
> @@ -237,10 +237,9 @@ static int st_dwc3_probe(struct platform_device *pdev)
>  
>  	dwc3_data->rstc_pwrdn =
>  		devm_reset_control_get_exclusive(dev, "powerdown");
> -	if (IS_ERR(dwc3_data->rstc_pwrdn)) {
> -		dev_err(&pdev->dev, "could not get power controller\n");
> -		return PTR_ERR(dwc3_data->rstc_pwrdn);
> -	}
> +	if (IS_ERR(dwc3_data->rstc_pwrdn))
> +		return dev_err_probe(dev, PTR_ERR(dwc3_data->rstc_pwrdn),
> +				     "could not get power controller\n");
>  
>  	/* Manage PowerDown */
>  	reset_control_deassert(dwc3_data->rstc_pwrdn);
> @@ -248,8 +247,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
>  	dwc3_data->rstc_rst =
>  		devm_reset_control_get_shared(dev, "softreset");
>  	if (IS_ERR(dwc3_data->rstc_rst)) {
> -		dev_err(&pdev->dev, "could not get reset controller\n");
> -		ret = PTR_ERR(dwc3_data->rstc_rst);
> +		ret = dev_err_probe(dev, PTR_ERR(dwc3_data->rstc_rst),
> +				    "could not get reset controller\n");
>  		goto undo_powerdown;
>  	}
>  
> 


Reviewed-by: Patrice Chotard <patrice.chotard@...s.st.com>

Thanks
Patrice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ