phy:phy-lantiq-rcu-usb2: Use PTR_ERR_OR_ZERO to replace the open coded version
authorzhong jiang <zhongjiang@huawei.com>
Thu, 16 Aug 2018 15:58:55 +0000 (23:58 +0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Mon, 10 Sep 2018 08:58:37 +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>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/lantiq/phy-lantiq-rcu-usb2.c

index 986224fca9e913ca521695376bdb818cbec28612..a918c5b2c4d9d553bbd5951fcadfb5e46982f8bd 100644 (file)
@@ -196,10 +196,8 @@ static int ltq_rcu_usb2_of_parse(struct ltq_rcu_usb2_priv *priv,
        }
 
        priv->phy_reset = devm_reset_control_get_optional(dev, "phy");
-       if (IS_ERR(priv->phy_reset))
-               return PTR_ERR(priv->phy_reset);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(priv->phy_reset);
 }
 
 static int ltq_rcu_usb2_phy_probe(struct platform_device *pdev)