From: Jack Morgenstein Date: Wed, 30 May 2012 09:14:50 +0000 (+0000) Subject: net/mlx4_core: Fix the slave_id out-of-range test in mlx4_eq_int X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=30f7c73bed749814f4985b1ce4566fe64b9c25f0;p=openwrt%2Fstaging%2Fblogic.git net/mlx4_core: Fix the slave_id out-of-range test in mlx4_eq_int Ths fixes the comparison in the FLR (Function Level Reset) event case. Signed-off-by: Jack Morgenstein Reviewed-by: Or Gerlitz Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 3b6f8efbf141..bce98d9c0039 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -426,7 +426,7 @@ static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq) mlx4_dbg(dev, "FLR event for slave: %d\n", flr_slave); - if (flr_slave > dev->num_slaves) { + if (flr_slave >= dev->num_slaves) { mlx4_warn(dev, "Got FLR for unknown function: %d\n", flr_slave);