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] [day] [month] [year] [list]
Message-ID: <a9a1bd05-cdcf-1273-9229-20b963a97128@gmail.com>
Date:   Sun, 27 Aug 2017 21:49:38 +0300
From:   Matthias Brugger <matthias.bgg@...il.com>
To:     Himanshu Jha <himanshujha199640@...il.com>,
        gregkh@...uxfoundation.org
Cc:     jslaby@...e.com, linux-serial@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO



On 08/27/2017 09:31 AM, Himanshu Jha wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Signed-off-by: Himanshu Jha <himanshujha199640@...il.com>
> ---
>   drivers/tty/serial/8250/8250_mtk.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
> index ce0cc47..fb45770 100644
> --- a/drivers/tty/serial/8250/8250_mtk.c
> +++ b/drivers/tty/serial/8250/8250_mtk.c
> @@ -171,10 +171,7 @@ static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p,
>   	}
>   
>   	data->bus_clk = devm_clk_get(&pdev->dev, "bus");
> -	if (IS_ERR(data->bus_clk))
> -		return PTR_ERR(data->bus_clk);
> -
> -	return 0;
> +	return PTR_ERR_OR_ZERO(data->bus_clk);
>   }
>   

Reviewed-by: Matthias Brugger <matthias.bgg@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ