]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: dsa: legacy: don't unmask port bitmaps
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 23 Oct 2017 18:17:30 +0000 (14:17 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 08:05:04 +0000 (17:05 +0900)
The legacy code does not unmask the cpu_port_mask and dsa_port_mask as
stated. But this is done on the error path and those masks won't be used
after that. So instead of fixing the bit operation, simply remove it.

Fixes: 83c0afaec7b7 ("net: dsa: Add new binding implementation")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/legacy.c

index b6c88fd33d4f0eab2b5313b593f70aecdcaf1ed7..93c1c43bcc58352c9aa5d9aa4b9e06cfecc40f91 100644 (file)
@@ -272,10 +272,6 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
                if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)))
                        continue;
                dsa_cpu_dsa_destroy(&ds->ports[port]);
-
-               /* Clearing a bit which is not set does no harm */
-               ds->cpu_port_mask |= ~(1 << port);
-               ds->dsa_port_mask |= ~(1 << port);
        }
 
        if (ds->slave_mii_bus && ds->ops->phy_read)