Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5479921imm; Tue, 26 Jun 2018 12:00:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLqhngchtc63Tqi83BqPqVs+dx/30uK1c9W/QjnuZ7UTzyGpewidxhHftTuvUYG4+sz+udR X-Received: by 2002:a17:902:6bc7:: with SMTP id m7-v6mr2909495plt.162.1530039626851; Tue, 26 Jun 2018 12:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530039626; cv=none; d=google.com; s=arc-20160816; b=uHXxcez/4psd33Cl3uPATfwDljhHRGl2V/8gqOojkJd+DxY2XAO75HnFCzjz/YUkli gFd51bKjtO6SdDbFS+XoZTgYxXnI0pT6vO2d2/QMDj0g68x9BQtoZryU57UlDZfLSo39 hgqjNzVbbWx4vQKlWU94/bzGUPWej8sSyBHcdPEtn/OB6mFmdgrcT2kWtTcKAvEWZncw lNI+AXi1/RNdHgYaQ9MeFxemqHtqXC9HK7gG/q3EVHKGUCjLwtXxXja5iJHvQTgu+p5H 0nAfTlaiKp4qBoooD8aOs6mrTyi0/o8oHhXgqVQjHcHalDFAJSs5Yyxzh2SrTi0vkuH7 cnmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=1kVuNQOTt1wlBloZI3i128kwwKIjBsAj4IBdOC+FCz8=; b=oM+X4Q6+Vt4448BObGpuFEO9HtdWPoedBRCwncbUVRtihTeLKlUfA1xOwD9DYx0WBv hXkpIVXkDzQsEhzlJxsJZVP890ptUASDnh0Cems0ttVMYzCRdvBq3SNzbNqXHHe+R3qQ /g4d32icE9M8yKzAuqjK2ULTL6KA/7nUBrmnzt95lm8AgS7S7hcBNA4iMn4vVwjZEOtP IzdaY2oR6Htybo97V65nJ7rqxBXlSEqX/HFSOFnrdaUwDBxZZQQkp+fsaTDz1ImKvex1 Vrdo9q3dEy6aCT5mrixWYczfJuQiJJByeUD2DHWABoW4GiEArfZBWENj3I8rdEIJy8/B VH9A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17-v6si1907504pgf.352.2018.06.26.12.00.11; Tue, 26 Jun 2018 12:00:26 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754751AbeFZRvT (ORCPT + 99 others); Tue, 26 Jun 2018 13:51:19 -0400 Received: from secvs02.rockwellcollins.com ([205.175.225.241]:21409 "EHLO secvs02.rockwellcollins.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754714AbeFZRvQ (ORCPT ); Tue, 26 Jun 2018 13:51:16 -0400 Received: from ofwgwc03.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.225.12]) by secvs02.rockwellcollins.com with ESMTP; 26 Jun 2018 12:51:15 -0500 X-Received: from righttwix.rockwellcollins.com (righttwix.rockwellcollins.com [192.168.141.218]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id 9B16D2007E; Tue, 26 Jun 2018 12:51:15 -0500 (CDT) From: Brandon Maier To: netdev@vger.kernel.org Cc: andrew@lunn.ch, f.fainelli@gmail.com, davem@davemloft.net, michal.simek@xilinx.com, clayton.shotwell@rockwellcollins.com, kristopher.cory@rockwellcollins.com, linux-kernel@vger.kernel.org, Brandon Maier Subject: [PATCH net-next v2 3/3] net: phy: xgmiitorgmii: Check read_status results Date: Tue, 26 Jun 2018 12:50:50 -0500 Message-Id: <20180626175050.71165-3-brandon.maier@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> References: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We're ignoring the result of the attached phy device's read_status(). Return it so we can detect errors. Signed-off-by: Brandon Maier --- v2: - No change v1: https://marc.info/?l=linux-netdev&m=152838766410559&w=2 drivers/net/phy/xilinx_gmii2rgmii.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index d6f8b64cddbe..74a8782313cf 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -42,8 +42,11 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev) struct mii_bus *bus = priv->mdio->bus; int addr = priv->mdio->addr; u16 val = 0; + int err; - priv->phy_drv->read_status(phydev); + err = priv->phy_drv->read_status(phydev); + if (err < 0) + return err; val = mdiobus_read(bus, addr, XILINX_GMII2RGMII_REG); val &= ~XILINX_GMII2RGMII_SPEED_MASK; -- 2.17.1