net: phy: at803x: Change error to EINVAL for invalid MAC
authorDan Murphy <dmurphy@ti.com>
Tue, 10 Oct 2017 17:42:56 +0000 (12:42 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Oct 2017 21:14:32 +0000 (14:14 -0700)
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>
drivers/net/phy/at803x.c

index c1e52b9dc58d39f02f279b46f400fa811efe3866..5f93e6add56394f28f68da72ddb8fc724db14200 100644 (file)
@@ -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,