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] [day] [month] [year] [list]
Message-ID: <Y2Mso+AwtEURmPMI@kroah.com>
Date:   Thu, 3 Nov 2022 03:51:15 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Zeng Heng <zengheng4@...wei.com>
Cc:     jirislaby@...nel.org, f.fainelli@...il.com, sbranden@...adcom.com,
        l.sanfilippo@...bus.com, guomengqi3@...wei.com, rjui@...adcom.com,
        ilpo.jarvinen@...ux.intel.com,
        bcm-kernel-feedback-list@...adcom.com, athierry@...hat.com,
        linux-arm-kernel@...ts.infradead.org,
        linux-rpi-kernel@...ts.infradead.org, liwei391@...wei.com,
        linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH] serial: 8250_bcm2835aux: return PTR_ERR when fail to
 acquire clk

On Sun, Oct 23, 2022 at 02:50:53PM +0800, Zeng Heng wrote:
> Add error handling process when fail to acquire clk by
> `devm_clk_get_optional`.
> 
> Signed-off-by: Zeng Heng <zengheng4@...wei.com>
> ---
>  drivers/tty/serial/8250/8250_bcm2835aux.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c
> index 15a2387a5b25..1c623e93232c 100644
> --- a/drivers/tty/serial/8250/8250_bcm2835aux.c
> +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
> @@ -119,6 +119,8 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev)
>  
>  	/* get the clock - this also enables the HW */
>  	data->clk = devm_clk_get_optional(&pdev->dev, NULL);
> +	if (IS_ERR(data->clk))
> +		return PTR_ERR(data->clk);

How was this tested to verify that it works properly?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ