From: Dan Carpenter <dan.carpenter@oracle.com>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Ruslan Babayev <ruslan@babayev.com>, 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: Re: [PATCH net] net: phy: sfp: clean up a condition
Date: Fri, 14 Jun 2019 07:43:20 +0300 [thread overview]
Message-ID: <20190614044320.GI1893@kadam> (raw)
In-Reply-To: <20190613180016.ekg55vzkuczapfpl@shell.armlinux.org.uk>
On Thu, Jun 13, 2019 at 07:00:16PM +0100, Russell King - ARM Linux admin wrote:
> On Thu, Jun 13, 2019 at 09:51:02AM +0300, Dan Carpenter wrote:
> > 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;
>
> If "ret" is a Linux error code, should we print its value when reporting
> the error so we know why the failure occurred, and propagate the error
> code?
We can't propagate the error code because we might have failed because
acpi_node_get_property_reference() succeeded but it's not a device node.
regards,
dan carpenter
next prev parent reply other threads:[~2019-06-14 4:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 6:51 [PATCH net] net: phy: sfp: clean up a condition Dan Carpenter
2019-06-13 17:54 ` Ruslan Babayev
2019-06-13 18:00 ` Russell King - ARM Linux admin
2019-06-14 4:43 ` Dan Carpenter [this message]
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=20190614044320.GI1893@kadam \
--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).