aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-08-16 11:58:55 -0400
committerKishon Vijay Abraham I <kishon@ti.com>2018-09-10 04:58:37 -0400
commit9be08a27a1588d0b0143486f96c7a08f8cfadae8 (patch)
tree683156d256a743ec4c7b72354f0d8721943ccad5
parent528648143354e0551087adfad27c174083316ca3 (diff)
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 <zhongjiang@huawei.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
-rw-r--r--drivers/phy/lantiq/phy-lantiq-rcu-usb2.c4
1 files changed, 1 insertions, 3 deletions
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,
196 } 196 }
197 197
198 priv->phy_reset = devm_reset_control_get_optional(dev, "phy"); 198 priv->phy_reset = devm_reset_control_get_optional(dev, "phy");
199 if (IS_ERR(priv->phy_reset))
200 return PTR_ERR(priv->phy_reset);
201 199
202 return 0; 200 return PTR_ERR_OR_ZERO(priv->phy_reset);
203} 201}
204 202
205static int ltq_rcu_usb2_phy_probe(struct platform_device *pdev) 203static int ltq_rcu_usb2_phy_probe(struct platform_device *pdev)