aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mthca
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 132fcb854c1..293c69b1e48 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -494,7 +494,7 @@ static struct ib_mr *mthca_reg_phys_mr(struct ib_pd *pd,
mask = 0;
total_size = 0;
for (i = 0; i < num_phys_buf; ++i) {
- if (buffer_list[i].addr & ~PAGE_MASK)
+ if (i != 0 && buffer_list[i].addr & ~PAGE_MASK)
return ERR_PTR(-EINVAL);
if (i != 0 && i != num_phys_buf - 1 &&
(buffer_list[i].size & ~PAGE_MASK))