net/mlx4_core: Fix the slave_id out-of-range test in mlx4_eq_int
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Wed, 30 May 2012 09:14:50 +0000 (09:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 May 2012 22:18:15 +0000 (18:18 -0400)
Ths fixes the comparison in the FLR (Function Level Reset) event case.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/eq.c

index 3b6f8efbf141278e8ad0958df64d7a852cf933fa..bce98d9c0039b87e74f8d7b7fbd9db3b0281d0bb 100644 (file)
@@ -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);