Return-Path: From: alexander.levin@verizon.com Cc: Dan Murphy , "David S . Miller" , alexander.levin@verizon.com To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.14 12/60] net: phy: at803x: Change error to EINVAL for invalid MAC Date: Wed, 13 Dec 2017 01:55:13 +0000 Message-ID: <20171213015455.6455-12-alexander.levin@verizon.com> References: <20171213015455.6455-1-alexander.levin@verizon.com> In-Reply-To: <20171213015455.6455-1-alexander.levin@verizon.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: From: Dan Murphy [ 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 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 =3D (const u8 *) ndev->dev_addr; =20 if (!is_valid_ether_addr(mac)) - return -EFAULT; + return -EINVAL; =20 for (i =3D 0; i < 3; i++) { phy_write(phydev, AT803X_MMD_ACCESS_CONTROL, --=20 2.11.0