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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04f68fe6-2f92-031d-a96f-e93d7c741d88@gmail.com>
Date:   Tue, 1 Sep 2020 09:10:12 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com,
        Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
        Paul Cercueil <paul@...pouillou.net>,
        Lukas Wunner <lukas@...ner.de>, linux-serial@...r.kernel.org,
        linux-rpi-kernel@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] serial: 8250: Simplify with dev_err_probe()



On 9/1/2020 8:30 AM, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and the error value gets printed.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
> ---
>   drivers/tty/serial/8250/8250_bcm2835aux.c | 12 +++---------
>   drivers/tty/serial/8250/8250_ingenic.c    | 20 ++++++--------------
>   2 files changed, 9 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c
> index 12d03e678295..fd95860cd661 100644
> --- a/drivers/tty/serial/8250/8250_bcm2835aux.c
> +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
> @@ -110,12 +110,8 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev)
>   
>   	/* get the clock - this also enables the HW */
>   	data->clk = devm_clk_get(&pdev->dev, NULL);
> -	ret = PTR_ERR_OR_ZERO(data->clk);
> -	if (ret) {
> -		if (ret != -EPROBE_DEFER)
> -			dev_err(&pdev->dev, "could not get clk: %d\n", ret);
> -		return ret;
> -	}
> +	if (IS_ERR(data->clk))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(data->clk), "could not get clk\n");

For 8250_bcm2835aux.c:

Acked-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ