From patchwork Fri Aug 19 12:48:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 9290229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5DEA6607FF for ; Fri, 19 Aug 2016 12:53:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C50C293D7 for ; Fri, 19 Aug 2016 12:53:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D03129404; Fri, 19 Aug 2016 12:53:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BC44C293D7 for ; Fri, 19 Aug 2016 12:53:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bajGz-0002OH-9Y; Fri, 19 Aug 2016 12:51:45 +0000 Received: from mail-sn1nam02on0056.outbound.protection.outlook.com ([104.47.36.56] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bajE2-00075F-Ln for linux-arm-kernel@lists.infradead.org; Fri, 19 Aug 2016 12:48:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=b1qnYR+53CP1s95Tehq+jb7YltFVVpE+7LvZZuNIGlE=; b=l57w+pRUbMYroCTxDsJnKVMmzinz4mUdsMMmFzgSMg/1bhrz9LMBJf8jDo78PuxmPCsGCmPIJG3S82mSIyDro4LUfYCPyoLihXY1zRtBbI8cukbJ8mTAiNT3JHEVqiuAUsSKIW5MWgRGoPhd/f9BszXhAJ+EOKnnZBxx93wguBw= Received: from BN1PR02CA0044.namprd02.prod.outlook.com (10.141.56.44) by BY2PR02MB458.namprd02.prod.outlook.com (10.141.144.142) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Fri, 19 Aug 2016 12:48:16 +0000 Received: from SN1NAM02FT011.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::205) by BN1PR02CA0044.outlook.office365.com (2a01:111:e400:2a::44) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.9 via Frontend Transport; Fri, 19 Aug 2016 12:48:16 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT011.mail.protection.outlook.com (10.152.72.82) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.577.8 via Frontend Transport; Fri, 19 Aug 2016 12:48:17 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:33369 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1bajDd-0003SG-TG; Fri, 19 Aug 2016 05:48:17 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1bajDc-0003ot-Op; Fri, 19 Aug 2016 05:48:16 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u7JCmFEW027718; Fri, 19 Aug 2016 05:48:15 -0700 Received: from [172.23.64.208] (helo=xhdrdevl6.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1bajDb-0003oY-84; Fri, 19 Aug 2016 05:48:15 -0700 Received: by xhdrdevl6.xilinx.com (Postfix, from userid 13614) id 4414BF2000A; Fri, 19 Aug 2016 18:18:14 +0530 (IST) From: Kedareswara rao Appana To: , , , , Subject: [PATCH 1/2] net: phy: Add error checks in the driver Date: Fri, 19 Aug 2016 18:18:10 +0530 Message-ID: <1471610891-13353-1-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 2.1.1 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22522.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(305945005)(42186005)(106466001)(8936002)(5001770100001)(229853001)(33646002)(586003)(189998001)(19580395003)(81156014)(50986999)(7846002)(8676002)(19580405001)(50226002)(356003)(81166006)(103686003)(63266004)(4326007)(2201001)(87936001)(52956003)(36756003)(2906002)(11100500001)(36386004)(48376002)(50466002)(626004)(92566002)(47776003)(5003940100001)(90966002)(45336002)(46386002)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB458; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT011; 1:gYEdzNFwGmHTTj69++i2M0WnnrmF6GpxGuU1rncqH4TgSTdrfnWh59TnCGADt2Y55LY0AJOjqdsUW2MI+Lo1FMvkiS3MQMbOOz00ac5mp7jibvHZXMYbnRKDxoVd0MZuE9M+Hyzlw0Lf20yImUEmxiuaKF4QpVVLfRKpgUHUBx9/MY5zXLoGNIIzOzcho0YwgWCeC0bnAmrK+m34Fl45emLMJmMXTUN72KgH8GDeBuYYUthgSoMU6ZbFSJj4HDy+W9LR/CTZC3q4GVe7L/SxfnLORIN4OFO2ImdXmene+6NEJo9N98F7iVwVyKu+DkkeWzAT8yJiL+XniFBLewNB+wudULNFVkzi+o7uswc+lmlctw2UMXjP6kdLsVLn/iedBgYiMKBWeQg3BSb5IK4BII6QWrbtNC+guSwe2cWNVXGuAvS2EezF+nLRA6Ny3bYl9y5m+Bj/NxcFtaco8mOxZ75gmqPSGW+KtucAS+XXLrNRfY+WQNFGjtA/Nq/977o8wfAUvz2mdltKvmjqrfpdChTvgFq62/K7qpQsZjQaa7WzKMidsi51Zt4SX2iHAik3+6XFxD61i2N2Q8QFnG8Q0o860HFArHr2KV34XSiIOm8= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 96e68bbf-8d34-4771-794b-08d3c82f17e0 X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB458; 2:yEqNB11Op7xI38d6ShxC+eFBgGDE/m9Omx4hHpWRWT2EmYb5fir/ppW0vbJgEycwlwTkveWc46moqbLD6TA5pdgEmQEAsHD1vv9mPbFfy4NCcV681dPmxstWXcnaur2hgBaXSOXASQns7RZ6ofOJiASh5wKcheQbIYzvmNgC5HbzNGwogQKe77BaOr6StpZe; 3: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zC4tQcfywY33SNFyMDrXRls9nLY8bwLaquipVXG5+G4n02nhj7HXDHCsdbJ1u6NOeeHoz0TNa1e3Nrt8cR+zw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB458; 31:e6Sde+1Hzuwb25T7D+IfpR0J19ooODhWiDDHMPZNdqjt0TLEeq9/v0VHWehxoePuvOQxEzFW1odOwhK92gQbogpZXR3ZaG+Hxs7EuU3CefZ/zfI2H2zO6aqAQ9gcaM8Xlt4DKacy1iQ4WAzpbw1Mp2T6EvWRlGBxkSWdbbY3QqPHVtD7uQVu/G6VD0hCIkt08benJKrwgBtWym7fe7WCiiJMHXsYMm8lZvRcMEbdihA=; 20:gfubVGS/4KIGq/96jTGvapAiEFQcn7Xi1BrKe4EgV/VvaM1BIH1tf1pPZDtx8EIJBMc7vn33ii4Pd6PSPx/eEyFgFNC2FrmRnGQ4fPZKP03Ol4dZCwFa01Dbb5gtrgav5GeCmfSw91DKmlZtAI7fUj4qwmcByNT2PJF1UQ+dDeENZl2E9bga+YR3XbYijQe+G3LTtgtz7kqmyVOa4HcxAZaorxQ0CEZtfPxXzmaGIPK0zKBO8j+eRzYghhxEu4ouzMP6NTPlOkg/JxdPtkVz9/dYP6m8nEHL4pfx98hre7s7TdLr4Zu4AB+HR49LRSEcKCYirbisdNkyBwYSHH/Oud2qBE5tYPkjXATm7v1PEd1+0/ZTA0EbADffeYMoF+KjHgME6eSfZmWPdSm6YEyIqrr9ZxEeztpU7fVBgq67rw29zqBb89dB1UrDi3v/5DuoQTqtg/UJ4zLEWSuXbhkEVm9/SbWBV+LE/TL7Kl2vkQ728jvAaMBOmc1iHqJPx/6W X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(13018025)(13015025)(13023025)(13024025)(13017025)(3002001)(10201501046)(6055026); SRVR:BY2PR02MB458; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB458; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB458; 4:JpurFYM3x8e4Uz0o5KytF8+Ybsdr1mM2426RR2uDKnkkZqy073DUk1KNFJukI6lfJIBFn9S1oaxNmUiOghE4tqWfsQb5L2EcwS5ejoaNsodsXFKkWxJ0XcWZeV6E0MdLAOKbXHgEOcIg+flECVi1DXTqEyLS9ofo6A5N1XCVn47Pie4IHKwPJgX7pSPzbsMzZhZ5RUIQdqUZCSA/PT52MsHcO0Be6fzfbLNiAvQruBOR8X5WvwPdBdTPBKzn1FtogWZgYEaU06+MmmDEJPcxyP3miTx31p6Rrs3c1CokvqNAd3LNdUb9sCE3kl5j/P4q4X2uf2t9iE+30KfQLE6ri2wEwS4o93vpagDXzARQOJ1Fe/6GGmavwTAkqOUJ/VnKRUhPGxo7hA7UETRyxjmhripWzGyogDoAbFZgsCiIF3gcO/dOpYYq9kv6Qn4RQRy+eyYpSPc/qt0ULtdRcGYg3PiXauWfvEDTD16ktf0Z3BbFv/TOwF6KAG/DDvvC68Y3nGrRQIicR5Ii3jj/fauqqcOrzZykTZCDhsIHoJkRbQs= X-Forefront-PRVS: 0039C6E5C5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR02MB458; 23:sA/RtPill5xLNGPAo0ecCdEDC1MfEalV+tb1hVMrG3?= =?us-ascii?Q?56blB+Ucky4FEwdmzHM6rjHjqV74Y2ZFCpFqFJ7MPuPDyLeVjBAS991COJp/?= =?us-ascii?Q?0VEJW5ekNuZd0dxik9Whs4rwz5zaOQ8VpnrVpmLL9mkQu6WQSZyunL06uNTc?= =?us-ascii?Q?VFNcdrccZia1XmSr0hEQtJjDsGKV/ExhKmSwTD0dbQ4XJ/gLOtIrGwwtbLxk?= =?us-ascii?Q?WtsUep4P79LeP+L9zf+o2p5y/fkLFrc0xKSTfXU3zw5np4h0UsalFWqENlG7?= =?us-ascii?Q?yiNqiDVO8TU1iHrYBxZQeNtvMVAu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WkdECTTg661+wYQ9zmzFhVd0QIoAl4s4I1EVfF7Ng9qkVsX2qw9NDWridq4laH4HdusGhtXWg3nu5yJKKrOUnl5MojdqIXdupqSZcMqj1SdIjGSTywTFf8HWPIRy8wsADlD0Bjfpg7oER9S26OMST7BI0YyU/sSDeqtBvV2HRlxt+FH9c9wsc9ZnrGhJgPGG3I34uuOo+3zUppGHgkHJKvL7BqWeQO1ULg+6K5J0NES6+fGYL+bfY2ok1ReAu6r7Pw0N88n3g5UXhZYZLdaoXXLtHcfRcMD737KVA==; 5:eA8sAhqFQ94/CRiRPazfsacewv7Wu8HVJ1Wfj1BmM4UwP0HcWLJr8aCj4TkTkaIeb2IfFi1FCqp2O+6Hk7rFfITCS9EhPsbmCrcBgY/VSqSXWTbXZdz1gIT6dNWWJ9e8IMnT5OXGLLRXlGmIk3HoDg==; 24:J2hxe0saCDfPEuX1N/VXBxHlpUeyD8kevlEDJvgMqZK+ZsvWELr1qG0t6gtaIdORYj0XriJUHxHM3ZjGtV4ETkpQu5v+NV00j8BWk8TogME=; 7:wZt7nMJ67B8b3Tjrg6dK922JGZs1T1ts8HfyeT1JKoaWt645nVPskLTcjHpJBA2Fl4Qqcws48TsEDHKjzrLw/9Q9XbUhgtww04xIsEyBdt/cfX4ONSI1S1oS2dNAPZAm2oTb/oVIB62t+iF6U1Vw8hOlOChfBn3tWhLCTp4p+llbE7j69Vg7gQuYGYiLk8EfuZhx27gZpcnM3nSY7cC372PPBdOoc5CEyXhmWcJBz9k0Us5QVC3IEkxQfiat2TDg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2016 12:48:17.6789 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB458 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160819_054843_122675_62B21CAC X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the necessary error checks in the driver. Reported-by: Andrew Lunn Signed-off-by: Kedareswara rao Appana --- drivers/net/phy/xilinx_gmii2rgmii.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index e7a20ec..7336fd0 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -39,11 +39,16 @@ struct gmii2rgmii { static int xgmiitorgmii_read_status(struct phy_device *phydev) { struct gmii2rgmii *priv = phydev->priv; - u16 val = 0; + int err, val = 0; - priv->phy_drv->read_status(phydev); + err = priv->phy_drv->read_status(phydev); + if (err < 0) + return err; val = mdiobus_read(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG); + if (val < 0) + return val; + val &= XILINX_GMII2RGMII_SPEED_MASK; if (phydev->speed == SPEED_1000) @@ -53,7 +58,10 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev) else val |= BMCR_SPEED10; - mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG, val); + err = mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG, + val); + if (err < 0) + return err; return 0; }