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: <7ba3b0be-4538-87a1-15f4-f2cbc6e12e66@gmail.com>
Date:   Wed, 15 Aug 2018 16:23:49 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     zhong jiang <zhongjiang@...wei.com>, alcooperx@...il.com,
        kishon@...com, robh@...nel.org, hauke@...ke-m.de,
        ralf@...ux-mips.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] phy:phy-brcm-us: Use PTR_ERR_OR_ZERO to replace the
 open code

On 08/13/2018 04:24 AM, zhong jiang wrote:
> PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So
> just replace them rather than duplicating its implement.

Subject should be:

phy: phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace open coded version

Thank you

> 
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
> ---
>  drivers/phy/broadcom/phy-brcm-usb.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c
> index d1dab36..f59b1dc 100644
> --- a/drivers/phy/broadcom/phy-brcm-usb.c
> +++ b/drivers/phy/broadcom/phy-brcm-usb.c
> @@ -372,10 +372,8 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)
>  	clk_disable(priv->usb_30_clk);
>  
>  	phy_provider = devm_of_phy_provider_register(dev, brcm_usb_phy_xlate);
> -	if (IS_ERR(phy_provider))
> -		return PTR_ERR(phy_provider);
>  
> -	return 0;
> +	return PTR_ERR_OR_ZERO(phy_provider);
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> 


-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ