diff mbox series

net: aquantia: add an error handling in aq_nic_set_multicast_list

Message ID 1571279116-4421-1-git-send-email-chenwandun@huawei.com
State Changes Requested
Delegated to: David Miller
Headers show
Series net: aquantia: add an error handling in aq_nic_set_multicast_list | expand

Commit Message

Chen Wandun Oct. 17, 2019, 2:25 a.m. UTC
From: Chenwandun <chenwandun@huawei.com>

Signed-off-by: Chenwandun <chenwandun@huawei.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andrew Lunn Oct. 17, 2019, 4:17 p.m. UTC | #1
On Thu, Oct 17, 2019 at 10:25:16AM +0800, Chen Wandun wrote:
> From: Chenwandun <chenwandun@huawei.com>

Hi Chen

There needs to be some sort of commit message. What [problems are you
seeing? That does this fix?

Thanks
	Andrew
diff mbox series

Patch

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);
 }