staging: fsl-dpaa2/ethsw: remove redundant VLAN check
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 13 Aug 2019 12:43:04 +0000 (15:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2019 14:46:25 +0000 (16:46 +0200)
The ethsw_add_vlan() function is already called only when the VLAN is
not yet configured on the switch. Remove the redundant check.

Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/1565700187-16048-8-git-send-email-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethsw/ethsw.c

index 20519af4d804c8200dfdd1d7e16aa2b812784a96..b69b2b7be972c03a9d44dd84201e8f634b8c0896 100644 (file)
@@ -34,11 +34,6 @@ static int ethsw_add_vlan(struct ethsw_core *ethsw, u16 vid)
                .fdb_id = 0,
        };
 
-       if (ethsw->vlans[vid]) {
-               dev_err(ethsw->dev, "VLAN already configured\n");
-               return -EEXIST;
-       }
-
        err = dpsw_vlan_add(ethsw->mc_io, 0,
                            ethsw->dpsw_handle, vid, &vcfg);
        if (err) {