From patchwork Mon Oct 9 12:03:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 115202 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2472985qgn; Mon, 9 Oct 2017 05:03:21 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC3VIdZHGqA5lXkxC8TW2Elrnh/PquvlkL3qsNi0B5xRlmGLK0nBbdU1O92bIePR/aj1V6C X-Received: by 10.98.158.211 with SMTP id f80mr9969840pfk.156.1507550601620; Mon, 09 Oct 2017 05:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507550601; cv=none; d=google.com; s=arc-20160816; b=SskcTBAEAin2afqMrQThEssSaXR3zcVueLT7Fgyf8kh7lbNlJaOSfPmnUQgTmXq3PU jbfHU3jWsROOBtXZsKDp2v0PG19Px+TX+3hnFsRJdgKfqazi0HQwJJqGlyBkRg9hDWT1 anElyhE/XhW3Igc3KmksOcAZRl5JpiOrcqRftcP2DyUIUb3BlMOUF1TGXXC9H+UCXMog L23s4fG9SW68m5IL8Ht2LFUNWcJ1qXE64IUWduXl2Aq7Ls8ZCFw6UTgvmV6yc4JQ9jGi AN2WLCC+NRVnIQvLbwLAAy04cVMrVuutIITa3fr2BKXKjwnYCOSjocHNltnUPYWAWgSN fGiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=cz5TYZw4+19aDgftkDkMtrqX8pG4G6DJxOGhvIR9zEw=; b=zhwiJ6gNranndrDcxsHgR6TwZy/30eXwXlIMAXwLJZGqaZIOwnFmGZToiS3V5ume8M TnAl0sfioMPE3DGhog+DQYag5UorlMjiSaCFqmA3t2nxqfwHA9C4Ad5OMrk2ZXVpzVWQ WmRedn7dO52XbeJ8SuXssSyB3I/Og6wHFfDEISZ0EhR/EhbYKNF6IhsjKicq/r7ZhZ9I L2RGVl3/Ou55AMmxVspTjVBX1zMWkaII/17V426GRtumKhpqjomh6n7APoVf8Qj/R0ze wMt8c7Rv33yKmH8nsEeohtpy+vDwKFR/i7zQB3aLUwSCsEKPzi+iRj/sglmUKkIweJG5 eABw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MAkPxAC2; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69si6872611pfh.27.2017.10.09.05.03.21; Mon, 09 Oct 2017 05:03:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MAkPxAC2; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754049AbdJIMDT (ORCPT + 8 others); Mon, 9 Oct 2017 08:03:19 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:45148 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635AbdJIMDQ (ORCPT ); Mon, 9 Oct 2017 08:03:16 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v99C38St005543; Mon, 9 Oct 2017 07:03:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1507550588; bh=hNobTR6px4SY7xk1GMv1ytWl/uK1nWPKM+UBnq5JjiI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MAkPxAC2bBqJJZo99sadwiT2hnGulmTE9U8Hy8ep8oB2ExMLweQpOa0WdCdRxCxRP jrtI8KRJGOOvkmKS5gmRIgg9net42i69VoD1xy/niipzvsP1eJICIKA4N487e7jIOw gTRViL1viDCtxaAxAO4YOScDsTnREhDH7EjH4Gs0= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v99C38GF016515; Mon, 9 Oct 2017 07:03:08 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 9 Oct 2017 07:03:07 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 9 Oct 2017 07:03:07 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v99C37ZC032089; Mon, 9 Oct 2017 07:03:07 -0500 Received: from localhost ([172.22.136.90]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v99C37311505; Mon, 9 Oct 2017 07:03:07 -0500 (CDT) From: Dan Murphy To: , CC: , , , Dan Murphy Subject: [PATCH v3 3/3] net: phy: Change error to EINVAL for invalid MAC Date: Mon, 9 Oct 2017 07:03:02 -0500 Message-ID: <20171009120302.23611-3-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171009120302.23611-1-dmurphy@ti.com> References: <20171009120302.23611-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 --- 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(-) -- 2.14.0 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,