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: <20240827014504.psd6mix4woyg4pin@synopsys.com>
Date: Tue, 27 Aug 2024 01:45:07 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
CC: Patrice Chotard <patrice.chotard@...s.st.com>,
        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>,
        "linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
        "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH 11/11] usb: dwc3: xilinx: simplify with dev_err_probe

On Wed, Aug 14, 2024, 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-xilinx.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c
> index b7613a106da6..eb535733ce91 100644
> --- a/drivers/usb/dwc3/dwc3-xilinx.c
> +++ b/drivers/usb/dwc3/dwc3-xilinx.c
> @@ -285,11 +285,8 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	regs = devm_platform_ioremap_resource(pdev, 0);
> -	if (IS_ERR(regs)) {
> -		ret = PTR_ERR(regs);
> -		dev_err_probe(dev, ret, "failed to map registers\n");
> -		return ret;
> -	}
> +	if (IS_ERR(regs))
> +		return dev_err_probe(dev, PTR_ERR(regs), "failed to map registers\n");
>  
>  	match = of_match_node(dwc3_xlnx_of_match, pdev->dev.of_node);
>  
> 
> -- 
> 2.43.0
> 

Acked-by: Thinh Nguyen <Thinh.Nguyen@...opsys.com>

Thanks,
Thinh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ