From patchwork Wed Dec 13 01:59:18 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: 121704 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4888706qgn; Tue, 12 Dec 2017 18:05:04 -0800 (PST) X-Google-Smtp-Source: ACJfBot5UnzdBX0ZQosBd9+9rK/U82QW7hUhFUJpb21PCyCkzI4GcIDEzHmiptEN61CKXaplKPB5 X-Received: by 10.84.229.79 with SMTP id d15mr4149487pln.397.1513130704428; Tue, 12 Dec 2017 18:05:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513130704; cv=none; d=google.com; s=arc-20160816; b=jINL5wo+79FRgnAwGwwnN25J/WYG7gbiHZxhMirFIjJ+avKhg8cruTScMGzCKU0jVu 6382bx3CaBk2ej1T2YVlWS+T1R/s/vC01mWoPL05f4bvj8J4rR+BQITCcZ8nHHSaRVGc aZImcbmkYy5LxtFDgzBpdym8JbslDGkpP5v16oaJaftlt2TtMOyoa9OdGytmzQcuBQfH NmywTiF40m35LHyH+hNHtayiSm/J0WF8H1ZJBob8ow9/HE7H6Z48rJUQ0yHp12CMUGCN gcyyCXFsvCeOQa4QLjywOMO7yGzrIyWffjW7REr3h5lSwK6n4mg0QI9Br1AbZwtf9tkD 2DqA== 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=Qb0BCNEfVwTX4hfuZ7y7J7vaU8/cmekcVYMIV3Axgvk=; b=EAXjub0PO/9ZVp1D6ca3RXtQFK8/tEy8C8VnZYOmMSYzzWBBnxB9CBYL75M12U5Q4V NeLk7QAo3NEVksxQAYMELbsmRppYTQVIcwUxhEBvD5MVG8kOg/fCq3f76X31Hl8fbuMo QIe9jAs5U52eGjG+IZdzyroDDl70E9sWgVbdGZ1GskWYnoxjmCVg9MLe5YvQriLtjmN3 sJ2UUHEiRcS0Op9QBxQv/+NIhE7zS0g9tpr+VKh8lsFS1/HL2/Y9scNertFwO725/kK8 ze0kWw/+P+rmxs0DO3UoAcc0v1Nunz5HKQ+rkhb9TR5vtuxN1JkfeSFCgci0Nq0Jd9AY iH5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=oXewp6R1; dkim=fail header.i=@verizon.com header.s=corp header.b=iAE8mGUX; dkim=fail header.i=@verizon.com header.s=corp header.b=j1RTPdoU; 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 f28si392670pgn.758.2017.12.12.18.05.04; Tue, 12 Dec 2017 18:05:04 -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=oXewp6R1; dkim=fail header.i=@verizon.com header.s=corp header.b=iAE8mGUX; dkim=fail header.i=@verizon.com header.s=corp header.b=j1RTPdoU; 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 S1753006AbdLMCFD (ORCPT + 10 others); Tue, 12 Dec 2017 21:05:03 -0500 Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:4918 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752279AbdLMCCo (ORCPT ); Tue, 12 Dec 2017 21:02:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130564; x=1544666564; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/9ivT2lsrWj7y04nE9tF10WGh3x/tZ6G7iCTJD+pPX0=; b=oXewp6R13k6G3vM+Oa+fFJ4gdKjjA0dVmuP6eOk2e3wvIn5Jvmfidtv5 IPvk23tJWWdJnAnAGybZoZJwd3Sfh65QimNmTUlJZULA87O3Hgw+FtN47 x/+1LDyzpG4F9qdJTYsxxfuZv6ppIDqA4rucH35IEdes60L8L08TB0Qkv 8=; Received: from unknown (HELO fldsmtpi03.verizon.com) ([166.68.71.145]) by omzsmtpe02.verizonbusiness.com with ESMTP; 13 Dec 2017 02:02:43 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi03.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 02:01:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130528; x=1544666528; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/9ivT2lsrWj7y04nE9tF10WGh3x/tZ6G7iCTJD+pPX0=; b=iAE8mGUXJ78KGoHHx6+3d4PTywMWR7x13cOvY4o4dwBUt4Z5QUYA0LTU G+l3KXz4JE2EjgCiHUnkZQ4+WInraSQWYHHLbhAwqpMNv8rV+Z1ed4Xa/ zCnk1NVUPuiyxTytvR55cJ9OD1Pu1BHgiGjIOi4K8zS6O32p9lsXwNZZO w=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 21:01:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130503; x=1544666503; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=/9ivT2lsrWj7y04nE9tF10WGh3x/tZ6G7iCTJD+pPX0=; b=j1RTPdoU82T9qprci+2Viqz/8dhQUkd9S6oglOr5ZiKc3NG1P0kEgCwc C8f9FTjCKvpO9p+2RomqlJ2nobGoCfQCVm+R7CzZk2DTG8FyVtUdJVixW RB9vz5xumWcayvZV2dfRrHhueCL3xB/+LP3VUH0AB/ZnVQS4pf08JXwzD c=; From: alexander.levin@verizon.com Cc: Dan Murphy , "David S . Miller" , alexander.levin@verizon.com X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh001.uswin.ad.vzwcorp.com ([10.144.218.43]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:01:43 +0000 Received: from tbwexch16apd.uswin.ad.vzwcorp.com (153.114.162.40) by OHTWI1EXH001.uswin.ad.vzwcorp.com (10.144.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:01:43 -0500 Received: from OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) by tbwexch16apd.uswin.ad.vzwcorp.com (153.114.162.40) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:01:42 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:01:41 -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:01:41 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 3.18 29/40] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Topic: [PATCH AUTOSEL for 3.18 29/40] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Index: AQHTc7X81Rs/lXD3oEiblTpsvUDrVQ== Date: Wed, 13 Dec 2017 01:59:18 +0000 Message-ID: <20171213015905.7059-29-alexander.levin@verizon.com> References: <20171213015905.7059-1-alexander.levin@verizon.com> In-Reply-To: <20171213015905.7059-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 fdc1b418fa6a..5012708271ca 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,