mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PHY: sunxi: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
@ 2014-04-11  8:38 Duan Jiong
  2014-04-14  9:55 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Duan Jiong @ 2014-04-11  8:38 UTC (permalink / raw)
  To: maxime.ripard; +Cc: linux-kernel, Duan Jiong

This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
 drivers/phy/phy-sun4i-usb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index e6e6c4b..f7bffe2 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -302,10 +302,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(dev, data);
 	phy_provider = devm_of_phy_provider_register(dev, sun4i_usb_phy_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id sun4i_usb_phy_of_match[] = {
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-14 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11  8:38 [PATCH] PHY: sunxi: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Duan Jiong
2014-04-14  9:55 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®