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: <0013c2d6-6587-3646-35f2-3804fb5b244c@ti.com>
Date:   Fri, 28 Aug 2020 11:01:00 +0300
From:   Grygorii Strashko <grygorii.strashko@...com>
To:     Krzysztof Kozlowski <krzk@...nel.org>, Ray Jui <rjui@...adcom.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Scott Branden <sbranden@...adcom.com>,
        <bcm-kernel-feedback-list@...adcom.com>,
        Keerthy <j-keerthy@...com>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Kevin Hilman <khilman@...nel.org>,
        Michal Simek <michal.simek@...inx.com>,
        <linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-omap@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 3/6] gpio: omap: Simplify with dev_err_probe()



On 27/08/2020 23:08, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and also it prints the error value.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
> ---
>   drivers/gpio/gpio-omap.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 7fbe0c9e1fc1..2dc12f4addbd 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1394,10 +1394,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
>   	if (bank->irq <= 0) {
>   		if (!bank->irq)
>   			bank->irq = -ENXIO;
> -		if (bank->irq != -EPROBE_DEFER)
> -			dev_err(dev,
> -				"can't get irq resource ret=%d\n", bank->irq);
> -		return bank->irq;
> +		return dev_err_probe(dev, bank->irq, "can't get irq resource\n");
>   	}
>   
>   	bank->chip.parent = dev;
> 

Acked-by: Grygorii Strashko <grygorii.strashko@...com>

-- 
Best regards,
grygorii

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ