Skip to content

Commit 3d00cf2

Browse files
Chenwandundavem330
authored andcommitted
net: aquantia: add an error handling in aq_nic_set_multicast_list
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 <[email protected]> Reviewed-by: Igor Russkikh <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7087383 commit 3d00cf2

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/aquantia/atlantic

1 file changed

+2
-0
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_nic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ int aq_nic_set_multicast_list(struct aq_nic_s *self, struct net_device *ndev)
664664
err = hw_ops->hw_multicast_list_set(self->aq_hw,
665665
self->mc_list.ar,
666666
self->mc_list.count);
667+
if (err < 0)
668+
return err;
667669
}
668670
return aq_nic_set_packet_filter(self, packet_filter);
669671
}

0 commit comments

Comments
 (0)