linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: aquantia: fix error handling in aq_nic_init
@ 2019-10-28  6:56 Gustavo A. R. Silva
  2019-10-28 10:53 ` [EXT] " Igor Russkikh
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-10-28  6:56 UTC (permalink / raw)
  To: Igor Russkikh, David S. Miller, Dmitry Bezrukov, Nikita Danilov,
	Andrew Lunn
  Cc: netdev, linux-kernel, Gustavo A. R. Silva

Fix currenty ignored returned error by properly error checking
aq_phy_init().

Addresses-Coverity-ID: 1487376 ("Unused value")
Fixes: dbcd6806af42 ("net: aquantia: add support for Phy access")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index 433adc099e44..1914aa0a19d0 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -341,7 +341,8 @@ int aq_nic_init(struct aq_nic_s *self)
 
 	if (self->aq_nic_cfg.aq_hw_caps->media_type == AQ_HW_MEDIA_TYPE_TP) {
 		self->aq_hw->phy_id = HW_ATL_PHY_ID_MAX;
-		err = aq_phy_init(self->aq_hw);
+		if (!aq_phy_init(self->aq_hw))
+			goto err_exit;
 	}
 
 	for (i = 0U, aq_vec = self->aq_vec[0];
-- 
2.23.0


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

end of thread, other threads:[~2019-10-28 12:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28  6:56 [PATCH net-next] net: aquantia: fix error handling in aq_nic_init Gustavo A. R. Silva
2019-10-28 10:53 ` [EXT] " Igor Russkikh
2019-10-28 12:00   ` Gustavo A. R. Silva

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).