phy:phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace the open coded version
authorzhong jiang <zhongjiang@huawei.com>
Thu, 16 Aug 2018 15:58:54 +0000 (23:58 +0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Mon, 10 Sep 2018 08:58:21 +0000 (14:28 +0530)
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So
just replace them rather than duplicating its implement.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/broadcom/phy-brcm-usb.c

index d1dab36fa5b7b92e12fd2851d9c5ad00a15214e0..f59b1dc30399b874b979628bff24a3310eaad414 100644 (file)
@@ -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