IB/mlx4: Check correct variable for allocation failure
[sfrench/cifs-2.6.git] / drivers / infiniband / hw / mlx4 / mr.c
index 8f3666b20ea43991d2f6f742d70161490b2851c8..63ec26f6b0c6a5c71c4375437c1861d8442c178a 100644 (file)
@@ -238,7 +238,7 @@ struct ib_fast_reg_page_list *mlx4_ib_alloc_fast_reg_page_list(struct ib_device
        mfrpl->mapped_page_list = dma_alloc_coherent(&dev->dev->pdev->dev,
                                                     size, &mfrpl->map,
                                                     GFP_KERNEL);
-       if (!mfrpl->ibfrpl.page_list)
+       if (!mfrpl->mapped_page_list)
                goto err_free;
 
        WARN_ON(mfrpl->map & 0x3f);