From patchwork Wed Dec 13 01:58:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121710 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4903661qgn; Tue, 12 Dec 2017 18:23:43 -0800 (PST) X-Google-Smtp-Source: ACJfBovox1AuSGaflrYiFLYILh2TGvNM5YWdpt/963FMseMY957ycQkIZKySKJo+5jnQsKiOgd5X X-Received: by 10.84.241.67 with SMTP id u3mr4344445plm.275.1513131823014; Tue, 12 Dec 2017 18:23:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513131823; cv=none; d=google.com; s=arc-20160816; b=IquFcBiizBh3De32Bb2lxCipMRn76+xbNRPFoWD517+aJFurnRz4S+f68XsTNjSr+n 8FoQXqW8tV9vFLTCuFPq2KYx+YaABvVfSrJkNvspXPr+ubK+8u5VVqJ4TddSA8iyCT3y rKht+pVnMRknvKUq3Ps8XHpclHS63iBBLTqfjQp7W2xtSp7NbBV9lLxrWK10wu7vmGRm 0itsZq2rlWR9tfP37dy/sMtfBJ2JUecRAqGXBU16evXfmZm60wmF5RKRIpvt5NjeNiv8 wBA8zaB0p/Alp3YEuQg6zk2vChRIV1pet6gTRQ+xthmccvu64PEaOosibcmqr+R4j+ai zPTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=kCc5faJBXwdDwFtGuf9zkfseR0exJ5LLUuQNDQh6LNs=; b=DvG+JRzLY6rckPwCoU32WH9soSC0NeUEC1V4qIAhEQNI+RXIINrCduw2bkRSIcEtbv DzcYVDVkn86SgYF9Tq9jUDsRjUj8MI0G7Ye2xInBXgK7DoHbf/V89D5dSoMAwMkLPgVZ E4OpxHkKenuouDbDKEu2KfQp5skJoUuKX1cGkgTx4yzV518sqtU5kCpUVFA9mDqibbAb zxc08AaytfYHOrDLrY7HQGzwgXsT8lwnElDLRhy51T/mSEOvWIFaG1STJhT/WkoTvxrg X43OPLNnnZaU7X6YthwlQQjjl1/HIAlw0aogSZ3nmbq71vu7a7l0HojdB2L4hXpAWA/X vESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=aabN0Q1W; dkim=fail header.i=@verizon.com header.s=corp header.b=RkF8PGS1; dkim=fail header.i=@verizon.com header.s=corp header.b=udZoxdPT; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si448841plk.773.2017.12.12.18.23.42; Tue, 12 Dec 2017 18:23:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=aabN0Q1W; dkim=fail header.i=@verizon.com header.s=corp header.b=RkF8PGS1; dkim=fail header.i=@verizon.com header.s=corp header.b=udZoxdPT; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753419AbdLMCXg (ORCPT + 10 others); Tue, 12 Dec 2017 21:23:36 -0500 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:35576 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753569AbdLMCAd (ORCPT ); Tue, 12 Dec 2017 21:00:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130433; x=1544666433; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=KIwtbrmSVaW7pLGvcLoHdTjTDpqXZdDLOL3InW1lDO8=; b=aabN0Q1WhF5UqCjPbWfKfzQu0T8H4aNvj88M8CQLyd61gfVL0J3Vu3Ou tT3EfwrM90el57XNrrKJyvGmxFT1weB+TVOiVdj0vTWPEEqTAzbIfHKbd K/Xpr3fLsgDMtKPii/YFu06fm+3IEU6/LvKnSG8ZBEiQSxWgcEvdpIEtf A=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe01.verizonbusiness.com with ESMTP; 13 Dec 2017 02:00:21 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 02:00:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130415; x=1544666415; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=KIwtbrmSVaW7pLGvcLoHdTjTDpqXZdDLOL3InW1lDO8=; b=RkF8PGS1vh9RZSL/t+U/kxTiJluPbMIDNGFMTnQPuF6BMuEJwQO+LsRN JlI3RnL9vtZ+SnmkmUL9AoMrOMHx621NL4fmgBtRsw9FmejunNAXe9k7J EEbBxkhSohUDxhYT9tJX+xF5pOgnqtDmPxq7U0Dkyh3w9s+QucCPEI4MQ c=; Received: from endeavour.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.163]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 21:00:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130415; x=1544666415; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=KIwtbrmSVaW7pLGvcLoHdTjTDpqXZdDLOL3InW1lDO8=; b=udZoxdPTPwpUKqgCbmqDBy1sOnbB3Uc+qjWLIeZ+fTetafpamB3FWWH4 JxZW3t/BmBNIEhesrB2evcaaHI+oPC6lF21/dblkQcToycCErH4DkAXmC vRcBLQ5yNzsCd5aL8IbiJqlpm1I8KE5MB/ySHhG3sySr4wkVD7kqChXCw U=; From: alexander.levin@verizon.com Cc: Dan Murphy , "David S . Miller" , alexander.levin@verizon.com X-Host: endeavour.tdc.vzwcorp.com Received: from ohtwi1exh003.uswin.ad.vzwcorp.com ([10.144.218.45]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:00:15 +0000 Received: from tbwexch17apd.uswin.ad.vzwcorp.com (153.114.162.41) by OHTWI1EXH003.uswin.ad.vzwcorp.com (10.144.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:00:15 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by tbwexch17apd.uswin.ad.vzwcorp.com (153.114.162.41) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:00:14 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:00:14 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 20:00:14 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.4 44/59] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Topic: [PATCH AUTOSEL for 4.4 44/59] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Index: AQHTc7XjY4IE+c5A8k6FSy971Kga/Q== Date: Wed, 13 Dec 2017 01:58:37 +0000 Message-ID: <20171213015817.6950-44-alexander.levin@verizon.com> References: <20171213015817.6950-1-alexander.levin@verizon.com> In-Reply-To: <20171213015817.6950-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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(-) -- 2.11.0 diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index 2d020a3ec0b5..37333d38b576 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 = (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,