IB/mlx4: Check gid_index return value
authorDaniel Jurgens <danielj@mellanox.com>
Thu, 10 Nov 2016 09:30:54 +0000 (11:30 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 17 Nov 2016 01:03:44 +0000 (20:03 -0500)
commit37995116fecfce2b61ee3da6e73b3e394c6818f9
tree53f4cec46b40bd9e9ea13bbe2c18dd8f40b15b1e
parenta1ab8402d15d2305d2315d96ec3294bfdf16587e
IB/mlx4: Check gid_index return value

Check the returned GID index value and return an error if it is invalid.

Fixes: 5070cd2239bd ('IB/mlx4: Replace mechanism for RoCE GID management')
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/ah.c