[bug report] mlxsw: spectrum: Apply RIF configuration when joining a LAG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ido Schimmel,

The patch 31e1de4f1242: "mlxsw: spectrum: Apply RIF configuration
when joining a LAG" from Dec 6, 2020, leads to the following Smatch
static checker warning:

	drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:8546 mlxsw_sp_port_vlan_router_join()
	warn: missing error code here? 'mlxsw_sp_rif_find_by_dev()' failed. 'err' = '0'

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
    8534 int
    8535 mlxsw_sp_port_vlan_router_join(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan,
    8536                                struct net_device *l3_dev,
    8537                                struct netlink_ext_ack *extack)
    8538 {
    8539         struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port_vlan->mlxsw_sp_port->mlxsw_sp;
    8540         struct mlxsw_sp_rif *rif;
    8541         int err = 0;
    8542 
    8543         mutex_lock(&mlxsw_sp->router->lock);
    8544         rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, l3_dev);
    8545         if (!rif)
--> 8546                 goto out;
                         ^^^^^^^^
Is this an error path?

    8547 
    8548         err = __mlxsw_sp_port_vlan_router_join(mlxsw_sp_port_vlan, l3_dev,
    8549                                                extack);
    8550 out:
    8551         mutex_unlock(&mlxsw_sp->router->lock);
    8552         return err;
    8553 }

regards,
dan carpenter



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux