aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/ehca/ehca_hca.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c
index 9209c5332dfe..8b92f85d4dd0 100644
--- a/drivers/infiniband/hw/ehca/ehca_hca.c
+++ b/drivers/infiniband/hw/ehca/ehca_hca.c
@@ -319,7 +319,7 @@ int ehca_query_gid(struct ib_device *ibdev, u8 port,
319 ib_device); 319 ib_device);
320 struct hipz_query_port *rblock; 320 struct hipz_query_port *rblock;
321 321
322 if (index > 255) { 322 if (index < 0 || index > 255) {
323 ehca_err(&shca->ib_device, "Invalid index: %x.", index); 323 ehca_err(&shca->ib_device, "Invalid index: %x.", index);
324 return -EINVAL; 324 return -EINVAL;
325 } 325 }