linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: aquantia: fix error handling in aq_ptp_poll
@ 2019-10-28  7:04 Gustavo A. R. Silva
  2019-10-28  9:53 ` [EXT] " Igor Russkikh
  2019-10-29 23:42 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-10-28  7:04 UTC (permalink / raw)
  To: Egor Pomozov, Igor Russkikh, David S. Miller, Sergey Samoilenko,
	Dmitry Bezrukov
  Cc: netdev, linux-kernel, Gustavo A. R. Silva

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 <gustavo@embeddedor.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [EXT] [PATCH net-next] net: aquantia: fix error handling in aq_ptp_poll
  2019-10-28  7:04 [PATCH net-next] net: aquantia: fix error handling in aq_ptp_poll Gustavo A. R. Silva
@ 2019-10-28  9:53 ` Igor Russkikh
  2019-10-29 23:42 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Igor Russkikh @ 2019-10-28  9:53 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Egor Pomozov, Igor Russkikh,
	David S. Miller, Sergey Samoilenko, Dmitry Bezrukov
  Cc: netdev, linux-kernel


> 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 <gustavo@embeddedor.com>

Thanks, Gustavo!

Reviewed-by: Igor Russkikh <irusskikh@marvell.com>

Regards,
  Igor

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: aquantia: fix error handling in aq_ptp_poll
  2019-10-28  7:04 [PATCH net-next] net: aquantia: fix error handling in aq_ptp_poll Gustavo A. R. Silva
  2019-10-28  9:53 ` [EXT] " Igor Russkikh
@ 2019-10-29 23:42 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-10-29 23:42 UTC (permalink / raw)
  To: gustavo
  Cc: epomozov, igor.russkikh, sergey.samoilenko, dmitry.bezrukov,
	netdev, linux-kernel

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Mon, 28 Oct 2019 02:04:47 -0500

> 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 <gustavo@embeddedor.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-29 23:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28  7:04 [PATCH net-next] net: aquantia: fix error handling in aq_ptp_poll Gustavo A. R. Silva
2019-10-28  9:53 ` [EXT] " Igor Russkikh
2019-10-29 23:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).