[MLX4] fail QP creation when both SQ & RQ are of zero size (fix to 1625)
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 2 Oct 2008 08:27:14 +0000 (08:27 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 2 Oct 2008 08:27:14 +0000 (08:27 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1626 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mlx4/kernel/bus/ib/qp.c

index 18ebc9e..2a03a73 100644 (file)
@@ -418,7 +418,7 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
                if (qp->rq.wqe_cnt)\r
                        qp->rq.wrid  = kmalloc(qp->rq.wqe_cnt * sizeof (u64), GFP_KERNEL);\r
 \r
-               if (!qp->sq.wrid || !qp->rq.wrid) {\r
+               if (!qp->sq.wrid && !qp->rq.wrid) {\r
                        err = -ENOMEM;\r
                        goto err_wrid;\r
                }\r