summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2012-05-30 11:14:50 +0200
committerDavid S. Miller <davem@davemloft.net>2012-06-01 00:18:15 +0200
commit30f7c73bed749814f4985b1ce4566fe64b9c25f0 (patch)
treef81846f040630122ca75e98d56aa5752396d36f2 /drivers
parentMerge tag 'for-v3.5' of git://git.infradead.org/battery-2.6 (diff)
downloadlinux-30f7c73bed749814f4985b1ce4566fe64b9c25f0.tar.xz
linux-30f7c73bed749814f4985b1ce4566fe64b9c25f0.zip
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 <jackm@dev.mellanox.co.il> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/eq.c2
1 files changed, 1 insertions, 1 deletions
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);