linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][net-next] net: ethernet: aquantia: remove redundant err check
@ 2017-01-27 14:43 Colin King
  2017-01-29 23:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-01-27 14:43 UTC (permalink / raw)
  To: David S . Miller, Pavel Belous, Alexander Loktionov,
	Dmitry Bezrukov, David VomLehn, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The check on err < 0 is redundant and can be removed. Detected
by CoverityScan, CID#1398321 ("Logically Dead Code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index afcecdb..da4bc09 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -145,8 +145,6 @@ int aq_pci_func_init(struct aq_pci_func_s *self)
 		}
 	}
 
-	if (err < 0)
-		goto err_exit;
 	for (i = 0; i < self->aq_hw_caps.msix_irqs; i++)
 		self->msix_entry[i].entry = i;
 
-- 
2.10.2

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

* Re: [PATCH][net-next] net: ethernet: aquantia: remove redundant err check
  2017-01-27 14:43 [PATCH][net-next] net: ethernet: aquantia: remove redundant err check Colin King
@ 2017-01-29 23:24 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-01-29 23:24 UTC (permalink / raw)
  To: colin.king
  Cc: Pavel.Belous, Alexander.Loktionov, Dmitry.Bezrukov, vomlehn,
	netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Fri, 27 Jan 2017 14:43:46 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> The check on err < 0 is redundant and can be removed. Detected
> by CoverityScan, CID#1398321 ("Logically Dead Code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

end of thread, other threads:[~2017-01-29 23:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 14:43 [PATCH][net-next] net: ethernet: aquantia: remove redundant err check Colin King
2017-01-29 23:24 ` 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).