From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sn1nam01on0094.outbound.protection.outlook.com ([104.47.32.94]:45235 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1031935AbeCAPYU (ORCPT ); Thu, 1 Mar 2018 10:24:20 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Dan Murphy , "David S . Miller" , Sasha Levin Subject: [added to the 4.1 stable tree] net: phy: at803x: Change error to EINVAL for invalid MAC Date: Thu, 1 Mar 2018 15:22:54 +0000 Message-ID: <20180301152116.1486-46-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Dan Murphy This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ 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 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 =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.14.1