From 082524971f8bf307d604eba664777098c912392a Mon Sep 17 00:00:00 2001 From: Igor Russkikh Date: Fri, 6 Nov 2020 18:36:54 -0500 Subject: [PATCH 037/139] [netdrv] net: aquantia: fix error handling in aq_ptp_poll Message-id: <1604687916-15087-38-git-send-email-irusskik@redhat.com> Patchwork-id: 338461 Patchwork-instance: patchwork O-Subject: [RHEL8.4 BZ 1857861 037/139] net: aquantia: fix error handling in aq_ptp_poll Bugzilla: 1857861 RH-Acked-by: David Arcari RH-Acked-by: John Linville RH-Acked-by: Tony Camuso Bugzilla: http://bugzilla.redhat.com/1857861 commit 76d7774e203d422edb6b8c6db800478ca029fde5 Author: Gustavo A. R. Silva Date: Mon Oct 28 02:04:47 2019 -0500 net: aquantia: fix error handling in aq_ptp_poll 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 Reviewed-by: Igor Russkikh Signed-off-by: David S. Miller Signed-off-by: Igor Russkikh Cc: David Arcari Cc: Igor Russkikh Signed-off-by: Jan Stancek --- 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 4ca36003c6ca..8175513e48c9 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.13.6