From: Dan Murphy <dmurphy@ti.com>
To: <andrew@lunn.ch>, <f.fainelli@gmail.com>
Cc: <netdev@vger.kernel.org>, <Woojung.Huh@microchip.com>,
<afd@ti.com>, Dan Murphy <dmurphy@ti.com>
Subject: [PATCH v3 3/3] net: phy: Change error to EINVAL for invalid MAC
Date: Mon, 9 Oct 2017 07:03:02 -0500 [thread overview]
Message-ID: <20171009120302.23611-3-dmurphy@ti.com> (raw)
In-Reply-To: <20171009120302.23611-1-dmurphy@ti.com>
Change the return error code to EINVAL if the MAC
address is not valid in the set_wol function.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
v3 - No changes made
v2 - There was no v1 on this patch this is new.
drivers/net/phy/at803x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index c1e52b9dc58d..5f93e6add563 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -167,7 +167,7 @@ static int at803x_set_wol(struct phy_device *phydev,
mac = (const u8 *) ndev->dev_addr;
if (!is_valid_ether_addr(mac))
- return -EFAULT;
+ return -EINVAL;
for (i = 0; i < 3; i++) {
phy_write(phydev, AT803X_MMD_ACCESS_CONTROL,
--
2.14.0
next prev parent reply other threads:[~2017-10-09 12:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 12:03 [PATCH v3 1/3] net: phy: Remove TI DP83822 from DP83848 driver Dan Murphy
2017-10-09 12:03 ` [PATCH v3 2/3] net: phy: DP83822 initial driver submission Dan Murphy
2017-10-09 16:27 ` Woojung.Huh
2017-10-09 12:03 ` Dan Murphy [this message]
2017-10-09 16:47 ` [PATCH v3 3/3] net: phy: Change error to EINVAL for invalid MAC Florian Fainelli
2017-10-09 16:44 ` [PATCH v3 1/3] net: phy: Remove TI DP83822 from DP83848 driver Florian Fainelli
2017-10-09 16:45 ` Dan Murphy
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=20171009120302.23611-3-dmurphy@ti.com \
--to=dmurphy@ti.com \
--cc=Woojung.Huh@microchip.com \
--cc=afd@ti.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
/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).