From patchwork Tue Oct 10 17:42:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 823951 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="opPvYhdx"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBPcW5TRlz9tYV for ; Wed, 11 Oct 2017 04:44:11 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932317AbdJJRoF (ORCPT ); Tue, 10 Oct 2017 13:44:05 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:46116 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932262AbdJJRoC (ORCPT ); Tue, 10 Oct 2017 13:44:02 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9AHh5dj004737; Tue, 10 Oct 2017 12:43:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1507657385; bh=Qt+tY7Ga9/4Ew7Y1t98vNAjQLaL4FNda77hPDGn1cOc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=opPvYhdx7pa2zDW0trihLcU3rutj9slhsIYZ2+heohEfnkrWt69Cit3V02bJmYdKD JOinT/KnCa7sxKxwAaxS7nd6dLeh/hD54Kg+w7V74lHEiT8MLurk4ET3aeXl+IaDbQ jAPPm1b2ZcJKOr8W6xEHk15Te0+isUUZEyNm24ac= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9AHh0Gj023150; Tue, 10 Oct 2017 12:43:00 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Tue, 10 Oct 2017 12:43:00 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Tue, 10 Oct 2017 12:43:00 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9AHh0rf015265; Tue, 10 Oct 2017 12:43:00 -0500 Received: from localhost ([172.22.136.90]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v9AHgx318802; Tue, 10 Oct 2017 12:42:59 -0500 (CDT) From: Dan Murphy To: , CC: , , , Dan Murphy Subject: [PATCH v5 2/2] net: phy: at803x: Change error to EINVAL for invalid MAC Date: Tue, 10 Oct 2017 12:42:56 -0500 Message-ID: <20171010174256.21930-2-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171010174256.21930-1-dmurphy@ti.com> References: <20171010174256.21930-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Change the return error code to EINVAL if the MAC address is not valid in the set_wol function. Signed-off-by: Dan Murphy --- v5 - No changes made v4 - Updated $subject to include the part number - https://www.mail-archive.com/netdev@vger.kernel.org/msg192424.html v3 - No changes made v2 - There was no v1 on this patch this is new. 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 = (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,