IB/mlx4: Check correct variable for allocation failure
authorDan Carpenter <error27@gmail.com>
Wed, 7 Apr 2010 09:39:01 +0000 (09:39 +0000)
committerRoland Dreier <rolandd@cisco.com>
Wed, 7 Apr 2010 21:18:14 +0000 (14:18 -0700)
The intent here is to check the "mfrpl->mapped_page_list" allocation.
We checked "mfrpl->ibfrpl.page_list" earlier.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
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);