Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2348599imm; Thu, 7 Jun 2018 09:09:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIGbcKMvnNdww1WBHv+OzpBRVI1DOscJ2ANIigTm+zoai4WoK1TuTmPyIm/P0KC5S0HTgDV X-Received: by 2002:a17:902:380c:: with SMTP id l12-v6mr2688200plc.19.1528387775003; Thu, 07 Jun 2018 09:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528387774; cv=none; d=google.com; s=arc-20160816; b=ht1EKn9OW9w/AoOP4JEPICpnsx2cMsc0h5fRnlbAg3s0cDXO5PUAwPaFXblimWLcbZ DxgwE/ESp+PoWkGz3L4bS2ba/HqqpB5bi+ox7PcIRezzZlZMpVoUvQps5yvJSWdAlDvB Q0Qs6Ke1e76BAgCMJuHUiKe6fqbHAzkJ9ns+zjCinK0hBPWHejM3SmlGPdRAtPQu3JXQ 3WjTUnhlRGQRmEvqBYMeZ48gLJr9hT9TjISd0S0VRVSi5AwvjfRNqlaHlOWFPaLm2wUC alJdryq8in5kmvItcY3PlOvQQ/s+ww/+2ipkNJRYPnOEswqYgGvrobY8F+ZQ12IMxE0G o9ZQ== 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=WgqBVoM42D4s3L12pGe1lKjlLIosejW3ISRigNKVzuU=; b=E3cPZID6StFM0mOXqcLzy41HKLG9xw0alL/myfgLIRkSHxGf/i0oM8tcyrOZRSdthr N3zCEWVKj8csY/5pcgiR/qo/occ8yEBbZelmVvTvKsudKbXfx0UeSY3B3NzvgVxWrp+L xVFIk+RAk2pQ0OHuti8ivNzvJhWzEkKXkDAy1apLHU9itm0QjFYfhdVKqQMhXy0gFjE8 bQ2eJivdFHJJteiRO0MVrFkMi69+kAZEw7jg98kHUlCgi1byt8A7ZbElF5MGIyfzL3I3 rPQR0uTJjauqshGXmHOLD5AQ7FCH1s2DtbPnOfvK+2KlR5CdORleI49IjyW0J0RLz9aX WUhQ== 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 p9-v6si52148234pls.460.2018.06.07.09.09.20; Thu, 07 Jun 2018 09:09:34 -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 S934644AbeFGQGS (ORCPT + 99 others); Thu, 7 Jun 2018 12:06:18 -0400 Received: from ch3vs01.rockwellcollins.com ([205.175.226.27]:22530 "EHLO ch3vs01.rockwellcollins.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933058AbeFGQGQ (ORCPT ); Thu, 7 Jun 2018 12:06:16 -0400 X-Greylist: delayed 567 seconds by postgrey-1.27 at vger.kernel.org; Thu, 07 Jun 2018 12:06:15 EDT Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs01.rockwellcollins.com with ESMTP; 07 Jun 2018 10:56:48 -0500 X-Received: from righttwix.rockwellcollins.com (righttwix.rockwellcollins.com [192.168.141.218]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id 242EE20094; Thu, 7 Jun 2018 10:56:48 -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 3/3] net: phy: xgmiitorgmii: Check read_status results Date: Thu, 7 Jun 2018 10:53:48 -0500 Message-Id: <20180607155348.149665-3-brandon.maier@rockwellcollins.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180607155348.149665-1-brandon.maier@rockwellcollins.com> References: <20180607155348.149665-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 --- 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.14.3