diff mbox series

[added,to,the,4.1,stable,tree] net: phy: at803x: Change error to EINVAL for invalid MAC

Message ID 20180301152116.1486-46-alexander.levin@microsoft.com
State New
Headers show
Series [added,to,the,4.1,stable,tree] net: phy: at803x: Change error to EINVAL for invalid MAC | expand

Commit Message

Sasha Levin March 1, 2018, 3:22 p.m. UTC
From: Dan Murphy <dmurphy@ti.com>


This patch has been added to the 4.1 stable tree. If you have any
objections, please let us know.

-- 
2.14.1
diff mbox series

Patch

===============

[ 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@microsoft.com>
---
 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 fabf11d32d27..d4b8ea30cd9d 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -105,7 +105,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,