From: Dan Carpenter <dan.carpenter@oracle.com>
To: Russell King <linux@armlinux.org.uk>,
Ruslan Babayev <ruslan@babayev.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH net] net: phy: sfp: clean up a condition
Date: Thu, 13 Jun 2019 09:51:02 +0300 [thread overview]
Message-ID: <20190613065102.GA16334@mwanda> (raw)
The acpi_node_get_property_reference() doesn't return ACPI error codes,
it just returns regular negative kernel error codes. This patch doesn't
affect run time, it's just a clean up.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/phy/sfp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index a991c80e6567..8a99307c1c39 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -1848,7 +1848,7 @@ static int sfp_probe(struct platform_device *pdev)
int ret;
ret = acpi_node_get_property_reference(fw, "i2c-bus", 0, &args);
- if (ACPI_FAILURE(ret) || !is_acpi_device_node(args.fwnode)) {
+ if (ret || !is_acpi_device_node(args.fwnode)) {
dev_err(&pdev->dev, "missing 'i2c-bus' property\n");
return -ENODEV;
}
--
2.20.1
next reply other threads:[~2019-06-13 16:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 6:51 Dan Carpenter [this message]
2019-06-13 17:54 ` [PATCH net] net: phy: sfp: clean up a condition Ruslan Babayev
2019-06-13 18:00 ` Russell King - ARM Linux admin
2019-06-14 4:43 ` Dan Carpenter
2019-06-15 2:21 ` David Miller
2019-06-15 7:09 ` Dan Carpenter
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=20190613065102.GA16334@mwanda \
--to=dan.carpenter@oracle.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=ruslan@babayev.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;
as well as URLs for NNTP newsgroup(s).