--- a/drivers/net/ethernet/mellanox/mlx4/intf.c +++ b/drivers/net/ethernet/mellanox/mlx4/intf.c @@ -217,6 +217,9 @@ void mlx4_unregister_device(struct mlx4_ struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_interface *intf; + if (!(dev->persist->interface_state & MLX4_INTERFACE_STATE_UP)) + return; + mlx4_stop_catas_poll(dev); if (dev->persist->interface_state & MLX4_INTERFACE_STATE_DELETION && mlx4_is_slave(dev)) {