From patchwork Wed Dec 13 01:57:41 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: 121713 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4911423qgn; Tue, 12 Dec 2017 18:33:22 -0800 (PST) X-Google-Smtp-Source: ACJfBot+PmU2SXgzHe/6ddHLt8E5wKX3aNsWljMBFWn261r8o2mCXjmZO+4G8qlqDrdT2ce8Swdy X-Received: by 10.98.160.70 with SMTP id r67mr4373794pfe.153.1513132402816; Tue, 12 Dec 2017 18:33:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513132402; cv=none; d=google.com; s=arc-20160816; b=a5GUa5ydaV811QZ6ZC9TAd+kYrISF3f0HIYOGhh7JdoaMFq0tr14Kcvo50SPUqV+4Y E0UJk92eIaQcR3ETThFPiQfrEMp06PNpryoce+BtuJl0haKSV4Mn5d3jGB4Qe68TFifs Te2EX8etBTsjszYZVfsEK76lsmYq2RrVag6IvGE7HzNtgzgtXPSMuaPDzJjtP5ELyo3X HzU5fU6YTEj9DNi102+75jCBlXW8ec7lpCvELU++/PMielIz4mtKJ/Lnod6qwwGEBoXi QApaBcLNwtXNpx6SAL08fEvVVqum0Khtc4Ncn+EqcOo2aaA/w7ZYEMRljmtBRMQf+BvF 68LA== 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=EDpS5wB0ouPCwWThvm1D47XOJ/Pq0KGHSIY6dCfIbmI=; b=ITEWorbWokyzYjbOFyoDnMjgqCvB8N+MFiPECj5ed7HtymHv6zzqdSk2yv9PPIHm91 9T2KlkSMhXo3xUCSDjf1UJzd/DM9Yn/ctf2cNlEtZTg/ZW4uD4V8e6nI/YNoMCWvxKQc FSazVzixGdZhmUr+XUusuryshkAUsiIbLnJ8Ix4U6YeanSskH52BNKh+c7Pk83ANa/CC jmYTDUc58xharQkWq4AUq7UQnI03MVAu1xTdJISjvsQuUeQUoWcuANArZ3fvS06uiIbv utPDRXb9uUzVVohOjqTXcYKQ1m4VH/28X6sROzGvRPL4/73l3UvLSacrHuRdH55XX9RM Xjag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=SjBZSY2F; dkim=fail header.i=@verizon.com header.s=corp header.b=G6i5arVn; dkim=fail header.i=@verizon.com header.s=corp header.b=afuHVEjL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 bb8si461847plb.287.2017.12.12.18.33.22; Tue, 12 Dec 2017 18:33:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=SjBZSY2F; dkim=fail header.i=@verizon.com header.s=corp header.b=G6i5arVn; dkim=fail header.i=@verizon.com header.s=corp header.b=afuHVEjL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1753280AbdLMCdT (ORCPT + 10 others); Tue, 12 Dec 2017 21:33:19 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:44470 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753358AbdLMB7T (ORCPT ); Tue, 12 Dec 2017 20:59:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130359; x=1544666359; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5nxAyR9Po6UATQahDzVPfJtJsGDReLxBLS4eoUTq6OM=; b=SjBZSY2FcqdTZu2FZ/o+LTGbIpwI5s7MKu24/vQW1L7e6aNwoPyDA6oF vpI3l19dP28o+hXkFvKPSXyLtkZSpgxvS4hzxo35pz/OcmPbwOsOdnoo9 ob1kOZkC9HWFBWDz4kxaO0H3CKIEG9LvA4fMUIlCY70XTeCcEubTawVBU Q=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by fldsmtpe03.verizon.com with ESMTP; 13 Dec 2017 01:58:57 +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 01:58:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130312; x=1544666312; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5nxAyR9Po6UATQahDzVPfJtJsGDReLxBLS4eoUTq6OM=; b=G6i5arVneTbFCQETIyfxzNn997kHrvTu3jXsXFLTnSnJGN47qrJ6a4eQ xZPqkJjOqofHlqobKb2DVLX2oNHsEXP7QfmqXcTeNCC25iAtuEkxBUhYx wWBGHRS4Be8175bwuHeeOoY/3E+UXft6GhKlY1AmmyUtXcYqbv7fyPPPf U=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 20:58:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130312; x=1544666312; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=5nxAyR9Po6UATQahDzVPfJtJsGDReLxBLS4eoUTq6OM=; b=afuHVEjLDV/IF+8ta0a2WqgtpbALLLM6GPUCWkPwVluNv9/RLT64cY90 MKxzf0mnxJTBV/I3JoUKygSr+RkmbKPziwmWFMDPkQHyyoygcgclMWQGp wkRrYXPjukJ16kILX1RzsJagYYgLpF0ozHzZzrAOTvUcLertWu4q58kxv Y=; From: alexander.levin@verizon.com Cc: Dan Murphy , "David S . Miller" , alexander.levin@verizon.com X-Host: mariner.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 01:58:32 +0000 Received: from tbwexch08apd.uswin.ad.vzwcorp.com (153.114.162.32) by OHTWI1EXH003.uswin.ad.vzwcorp.com (10.144.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 20:58:32 -0500 Received: from OMZP1LUMXCA20.uswin.ad.vzwcorp.com (144.8.22.198) by tbwexch08apd.uswin.ad.vzwcorp.com (153.114.162.32) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:58:31 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA20.uswin.ad.vzwcorp.com (144.8.22.198) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 19:58:30 -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 19:58:30 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 076/100] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Topic: [PATCH AUTOSEL for 4.9 076/100] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Index: AQHTc7XCQ1XysuZmEEWFjg9KR3O0Tw== Date: Wed, 13 Dec 2017 01:57:41 +0000 Message-ID: <20171213015722.6722-51-alexander.levin@verizon.com> References: <20171213015722.6722-1-alexander.levin@verizon.com> In-Reply-To: <20171213015722.6722-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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 a52b560e428b..3603eec7217f 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -166,7 +166,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,