Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3216411ybg; Mon, 28 Oct 2019 09:14:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqypMoA9sx2X1tWfhRmo4L/wo47QgR9yjYsHtoGhSgrm8WsSQTv/Q17aJuMsfBMiAVQekjiX X-Received: by 2002:a17:906:448e:: with SMTP id y14mr17749822ejo.136.1572279289427; Mon, 28 Oct 2019 09:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572279289; cv=none; d=google.com; s=arc-20160816; b=wzjUm8sDio5tu6XwcAnjhn4x7EtbX4syCrWdLYZubfjBjzvtVLpAUzcp+BfMC+KdTR csQE7G3UC3NyN9mlBspzbsS2w/qc7x4Vtv9+RIaeG+UEH0Dd/IMIq4y7clr0ge4xlGEH Rv39WOonRgyezOOwFJ+q0bdsGJWZkPDwWN3FD+pfLMPwyvwsxfzdUTXqpxHkRYb4atlB w5zLhsqf6Ld3S4WRfvcp121u/OQlaY9qIeo6d8S2g0Cqn+j2sEwlJFvhG/HWF1nfXflQ qixkFgiS6D2wnfBEd6z9Nmi50vhq/SKPaWMu/jVSrgIKnxYbFofq5o4754sBMG+uTbAj zSgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=cc1Lq/1I6uaUptz7nqvA6hsrq7d4wgFlwqeS4oYmYzU=; b=ostzEgfzMmckOIpdzHFcgqZjFW6FsNisbQRiBDmLoAPh9imhuUy8S1cKJIX6d7cCw6 FsvSHwLll9qf3pXi0bm0PvSLPLSLz9p0PjbzhD5WBOZEnHziStc5z6IyvvmUkEtEHUAP BRkm+FMwhrK+ES4q6rO5Y5wQigZ/tq4NqxWmik1OHtkX5oUTCAKCOyjBQj5LZobw7l7y Yon7FIzdKevVqZagb25sMpHEn5N9D8k9NUxxXpy8xxLVsaeZA0L+jXG3tI5ur3OU+W9i 1UO3IRdUSeqCY4KnMyupbqeePSjS3ORkSxPGNtF4ezCySn4AymfgjU0gjVh4w9+rkfwF 7+qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@embeddedor.com header.s=default header.b=WoVLRJRJ; 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 e8si4184716edk.444.2019.10.28.09.14.25; Mon, 28 Oct 2019 09:14:49 -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; dkim=fail header.i=@embeddedor.com header.s=default header.b=WoVLRJRJ; 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 S1732122AbfJ1HEv (ORCPT + 99 others); Mon, 28 Oct 2019 03:04:51 -0400 Received: from gateway22.websitewelcome.com ([192.185.46.142]:12027 "EHLO gateway22.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732101AbfJ1HEu (ORCPT ); Mon, 28 Oct 2019 03:04:50 -0400 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 79D364013 for ; Mon, 28 Oct 2019 02:04:49 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id Oz57iQARaVUVYOz57i1wGR; Mon, 28 Oct 2019 02:04:49 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Type:MIME-Version:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cc1Lq/1I6uaUptz7nqvA6hsrq7d4wgFlwqeS4oYmYzU=; b=WoVLRJRJ59aEd0sJv0mgkAnfA6 ZwEXpix02KGKjEbIw+HFzZ4aiMfvGWbufEN5SopsynMu7MJPd5GpQW6fNuuYtWAmfY+PCptigBnoi HJmG4SsWFG4lsAg2cJE0v3UWQOJ2xyUtGnJMIqQOXmBNDO8n+662Yxg8MGnuQxq8DPLn29U1ttsN8 C/ErRTaDE1Uv4APq0v0LvoX8voeiR/YCsggjKYKrFbRwoQoio6edcrjnRgmH58lr02y+2PzFcWScl Kenk96P6DgVuCtjE7REdkTLemeGS8AWPVkIZvaNBp2/6p5yDjyBJD61/zID6Dha8Vl5NSEeg98R0a r6TuMI0g==; Received: from [187.192.2.30] (port=58482 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.92) (envelope-from ) id 1iOz56-0046Kp-7m; Mon, 28 Oct 2019 02:04:48 -0500 Date: Mon, 28 Oct 2019 02:04:47 -0500 From: "Gustavo A. R. Silva" To: Egor Pomozov , Igor Russkikh , "David S. Miller" , Sergey Samoilenko , Dmitry Bezrukov Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH net-next] net: aquantia: fix error handling in aq_ptp_poll Message-ID: <20191028070447.GA3659@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 187.192.2.30 X-Source-L: No X-Exim-ID: 1iOz56-0046Kp-7m X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [187.192.2.30]:58482 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 7 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix currenty ignored returned error by properly checking *err* after calling aq_nic->aq_hw_ops->hw_ring_hwts_rx_fill(). Addresses-Coverity-ID: 1487357 ("Unused value") Fixes: 04a1839950d9 ("net: aquantia: implement data PTP datapath") Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/aquantia/atlantic/aq_ptp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c index 3ec08415e53e..92b666f7d242 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c @@ -678,6 +678,8 @@ static int aq_ptp_poll(struct napi_struct *napi, int budget) err = aq_nic->aq_hw_ops->hw_ring_hwts_rx_fill(aq_nic->aq_hw, &aq_ptp->hwts_rx); + if (err < 0) + goto err_exit; was_cleaned = true; } -- 2.23.0