net: dsa: b53: remove redundant premature assignment to new_pvid
authorColin Ian King <colin.king@canonical.com>
Wed, 27 May 2020 12:01:29 +0000 (13:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 18:28:23 +0000 (11:28 -0700)
Variable new_pvid is being assigned with a value that is never read,
the following if statement updates new_pvid with a new value in both
of the if paths. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_common.c

index ceb8be6..1df0584 100644 (file)
@@ -1325,7 +1325,6 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
        u16 pvid, new_pvid;
 
        b53_read16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), &pvid);
-       new_pvid = pvid;
        if (!vlan_filtering) {
                /* Filtering is currently enabled, use the default PVID since
                 * the bridge does not expect tagging anymore