aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw')
-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 132fcb854c1a..293c69b1e48f 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,
494 mask = 0; 494 mask = 0;
495 total_size = 0; 495 total_size = 0;
496 for (i = 0; i < num_phys_buf; ++i) { 496 for (i = 0; i < num_phys_buf; ++i) {
497 if (buffer_list[i].addr & ~PAGE_MASK) 497 if (i != 0 && buffer_list[i].addr & ~PAGE_MASK)
498 return ERR_PTR(-EINVAL); 498 return ERR_PTR(-EINVAL);
499 if (i != 0 && i != num_phys_buf - 1 && 499 if (i != 0 && i != num_phys_buf - 1 &&
500 (buffer_list[i].size & ~PAGE_MASK)) 500 (buffer_list[i].size & ~PAGE_MASK))