]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dpaa2-switch: fix VLAN upper check not rejecting bridge join
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 16 Jun 2026 10:54:30 +0000 (13:54 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 19 Jun 2026 00:52:52 +0000 (17:52 -0700)
The blamed commit refactored the prechangeupper event handling but
failed to actually return an error in case
dpaa2_switch_prevent_bridging_with_8021q_upper() detected a 802.1q upper
on a port which tries to join a bridge. Fix this by returning err
instead of 0.

Fixes: 45035febc495 ("net: dpaa2-switch: refactor prechangeupper sanity checks")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://patch.msgid.link/20260616105430.3725910-1-ioana.ciornei@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c

index 45f276c2c3ec6aab519c3c819cb3ddce05865707..9f75cd66ae38a13ea037c6f5e95e3d8bb633a847 100644 (file)
@@ -2212,7 +2212,7 @@ dpaa2_switch_prechangeupper_sanity_checks(struct net_device *netdev,
        if (err) {
                NL_SET_ERR_MSG_MOD(extack,
                                   "Cannot join a bridge while VLAN uppers are present");
-               return 0;
+               return err;
        }
 
        netdev_for_each_lower_dev(upper_dev, other_dev, iter) {