net/mlx4_core: Fix access to uninitialized index
authorTariq Toukan <tariqt@mellanox.com>
Sun, 15 May 2016 07:21:26 +0000 (10:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2016 17:58:01 +0000 (13:58 -0400)
commit2bb07e155bb3e0c722c806723f737cf8020961ef
tree0145447ab44391daeca1d5286499e7e6638c931f
parent2ffd7e035601268915a393ae0b7cac34c27e190e
net/mlx4_core: Fix access to uninitialized index

Prevent using uninitialized or negative index when handling
steering entries.

Fixes: b12d93d63c32 ('mlx4: Add support for promiscuous mode in the new steering model.')
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mcg.c