summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2017-10-10 12:42:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-25 14:26:25 +0100
commita5171fe705fb31bf3a0d93e8d69285d2b5b691c9 (patch)
tree01245cd3f34c9434325c3fe29db43a2873c4c758 /drivers
parentf3a68b4b82f3f19b80b84cf11753082e7fb6ec8f (diff)
net: phy: at803x: Change error to EINVAL for invalid MAC
[ Upstream commit fc7556877d1748ac00958822a0a3bba1d4bd9e0d ] 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/at803x.c2
1 files changed, 1 insertions, 1 deletions
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,