From 9be08a27a1588d0b0143486f96c7a08f8cfadae8 Mon Sep 17 00:00:00 2001 From: zhong jiang Date: Thu, 16 Aug 2018 23:58:55 +0800 Subject: phy:phy-lantiq-rcu-usb2: Use PTR_ERR_OR_ZERO to replace the open coded version 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 Acked-by: Hauke Mehrtens Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/phy/lantiq') diff --git a/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c b/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c index 986224fca9e9..a918c5b2c4d9 100644 --- a/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c +++ b/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c @@ -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) -- cgit v1.2.3-59-g8ed1b