OSDN Git Service

ice: remove unnecessary expression that is always true
authorBruce Allan <bruce.w.allan@intel.com>
Fri, 8 May 2020 00:41:10 +0000 (17:41 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 May 2020 05:10:04 +0000 (22:10 -0700)
The else conditional expression is always true due to the if conditional
expression; remove it and add a comment to make it obvious still.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c

index 6ac3e55..fffb343 100644 (file)
@@ -346,7 +346,8 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
                                vsi->current_netdev_flags &= ~IFF_ALLMULTI;
                                goto out_promisc;
                        }
-               } else if (!(vsi->current_netdev_flags & IFF_ALLMULTI)) {
+               } else {
+                       /* !(vsi->current_netdev_flags & IFF_ALLMULTI) */
                        if (vsi->vlan_ena)
                                promisc_m = ICE_MCAST_VLAN_PROMISC_BITS;
                        else