diff mbox series

[v5,2/2] net: phy: at803x: Change error to EINVAL for invalid MAC

Message ID 20171010174256.21930-2-dmurphy@ti.com
State New
Headers show
Series [v5,1/2] net: phy: DP83822 initial driver submission | expand

Commit Message

Dan Murphy Oct. 10, 2017, 5:42 p.m. UTC
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>

---

v5 - No changes made
v4 - Updated $subject to include the part number -
https://www.mail-archive.com/netdev@vger.kernel.org/msg192424.html
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(-)

-- 
2.14.0

Comments

David Miller Oct. 11, 2017, 9:14 p.m. UTC | #1
From: Dan Murphy <dmurphy@ti.com>

Date: Tue, 10 Oct 2017 12:42:56 -0500

> 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>


Applied to net-next.
diff mbox series

Patch

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,