[PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

Subsystems: aquantia ethernet driver (atlantic), networking drivers, the rest

STALE2530d

4 messages, 4 authors, 2019-10-19 · open the first message on its own page

[PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

From: Chen Wandun <hidden>
Date: 2019-10-18 10:13:59

From: Chenwandun <redacted>

add an error handling in aq_nic_set_multicast_list, it may not
work when hw_multicast_list_set error; and at the same time
it will remove gcc Wunused-but-set-variable warning.

Signed-off-by: Chenwandun <redacted>
---
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index 2a18439..137c1de 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -664,6 +664,8 @@ int aq_nic_set_multicast_list(struct aq_nic_s *self, struct net_device *ndev)
 		err = hw_ops->hw_multicast_list_set(self->aq_hw,
 						    self->mc_list.ar,
 						    self->mc_list.count);
+		if (err < 0)
+			return err;
 	}
 	return aq_nic_set_packet_filter(self, packet_filter);
 }
-- 
2.7.4

Re: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

From: Igor Russkikh <hidden>
Date: 2019-10-18 13:01:08

Thanks, Chen.

On 18.10.2019 13:20, Chen Wandun wrote:
From: Chenwandun <redacted>

add an error handling in aq_nic_set_multicast_list, it may not
work when hw_multicast_list_set error; and at the same time
it will remove gcc Wunused-but-set-variable warning.

Signed-off-by: Chenwandun <redacted>
Reviewed-by: Igor Russkikh <redacted>

Regards,
  Igor

Re: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

From: Andrew Lunn <andrew@lunn.ch>
Date: 2019-10-18 19:04:46

On Fri, Oct 18, 2019 at 06:20:37PM +0800, Chen Wandun wrote:
From: Chenwandun <redacted>

add an error handling in aq_nic_set_multicast_list, it may not
work when hw_multicast_list_set error; and at the same time
it will remove gcc Wunused-but-set-variable warning.

Signed-off-by: Chenwandun <redacted>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

Re: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

From: David Miller <davem@davemloft.net>
Date: 2019-10-19 19:17:05

From: Chen Wandun <redacted>
Date: Fri, 18 Oct 2019 18:20:37 +0800
From: Chenwandun <redacted>

add an error handling in aq_nic_set_multicast_list, it may not
work when hw_multicast_list_set error; and at the same time
it will remove gcc Wunused-but-set-variable warning.

Signed-off-by: Chenwandun <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help