From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: "Kishon Vijay Abraham I" <kishon@ti.com>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
linux-arm-kernel@lists.infradead.org,
Lior Amsalem <alior@marvell.com>,
Tawfik Bayouk <tawfik@marvell.com>,
Nadav Haklai <nadavh@marvell.com>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH v4 1/7] phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle
Date: Thu, 13 Nov 2014 12:47:43 +0100 [thread overview]
Message-ID: <1415879269-29711-2-git-send-email-gregory.clement@free-electrons.com> (raw)
In-Reply-To: <1415879269-29711-1-git-send-email-gregory.clement@free-electrons.com>
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: coccinelle/api/ptr_ret.cocci
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
drivers/phy/phy-berlin-sata.c | 5 +----
drivers/phy/phy-hix5hd2-sata.c | 5 +----
drivers/phy/phy-miphy365x.c | 5 +----
drivers/phy/phy-stih41x-usb.c | 5 +----
4 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
index 69ced52d72aa..86602c0ffb42 100644
--- a/drivers/phy/phy-berlin-sata.c
+++ b/drivers/phy/phy-berlin-sata.c
@@ -258,10 +258,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev)
phy_provider =
devm_of_phy_provider_register(dev, phy_berlin_sata_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 phy_berlin_sata_of_match[] = {
diff --git a/drivers/phy/phy-hix5hd2-sata.c b/drivers/phy/phy-hix5hd2-sata.c
index d5d978085c6d..62bc30ae0534 100644
--- a/drivers/phy/phy-hix5hd2-sata.c
+++ b/drivers/phy/phy-hix5hd2-sata.c
@@ -164,10 +164,7 @@ static int hix5hd2_sata_phy_probe(struct platform_device *pdev)
phy_set_drvdata(phy, priv);
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_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 hix5hd2_sata_phy_of_match[] = {
diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c
index 801afaf2d449..d2796a454f95 100644
--- a/drivers/phy/phy-miphy365x.c
+++ b/drivers/phy/phy-miphy365x.c
@@ -610,10 +610,7 @@ static int miphy365x_probe(struct platform_device *pdev)
}
provider = devm_of_phy_provider_register(&pdev->dev, miphy365x_xlate);
- if (IS_ERR(provider))
- return PTR_ERR(provider);
-
- return 0;
+ return PTR_ERR_OR_ZERO(provider);
}
static const struct of_device_id miphy365x_of_match[] = {
diff --git a/drivers/phy/phy-stih41x-usb.c b/drivers/phy/phy-stih41x-usb.c
index 9f16cb8e01f4..20c630c2f295 100644
--- a/drivers/phy/phy-stih41x-usb.c
+++ b/drivers/phy/phy-stih41x-usb.c
@@ -160,10 +160,7 @@ static int stih41x_usb_phy_probe(struct platform_device *pdev)
phy_set_drvdata(phy, phy_dev);
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_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 stih41x_usb_phy_of_match[] = {
--
1.9.1
next prev parent reply other threads:[~2014-11-13 11:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
2014-11-13 11:47 ` Gregory CLEMENT [this message]
2014-11-13 11:47 ` [PATCH v4 2/7] Phy: DT binding documentation for Marvell MVEBU SATA phy Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 3/7] Phy: DT binding documentation for the Armada 375 USB cluster binding Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 4/7] phy: add support for USB cluster on the Armada 375 SoC Gregory CLEMENT
2014-11-13 13:06 ` Thomas Petazzoni
2014-11-13 11:47 ` [PATCH v4 5/7] ARM: mvebu: add Device Tree description of USB cluster controller on Armada 375 Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers " Gregory CLEMENT
2014-11-22 2:08 ` Jason Cooper
2014-11-22 9:20 ` Gregory CLEMENT
2014-11-24 5:51 ` Kishon Vijay Abraham I
2014-11-26 3:59 ` Jason Cooper
2014-11-26 5:13 ` Kishon Vijay Abraham I
2014-11-26 5:17 ` Jason Cooper
2014-11-26 5:23 ` Kishon Vijay Abraham I
2014-11-13 11:47 ` [PATCH v4 7/7] MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver Gregory CLEMENT
2014-11-26 3:53 ` Jason Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415879269-29711-2-git-send-email-gregory.clement@free-electrons.com \
--to=gregory.clement@free-electrons.com \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=grant.likely@linaro.org \
--cc=jason@lakedaemon.net \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nadavh@marvell.com \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tawfik@marvell.com \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®