From: Dan Murphy Date: Tue, 10 Oct 2017 17:42:56 +0000 (-0500) Subject: net: phy: at803x: Change error to EINVAL for invalid MAC X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=fc7556877d1748ac00958822a0a3bba1d4bd9e0d;p=openwrt%2Fstaging%2Fblogic.git net: phy: at803x: Change error to EINVAL for invalid MAC Change the return error code to EINVAL if the MAC address is not valid in the set_wol function. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller --- 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,