Always set ib_post_recv()'s bad_wr.

Signed-off-by: Frank Zago <[email protected]>
Index: linux-2.6.31/drivers/infiniband/hw/nes/nes_verbs.c
===================================================================
--- linux-2.6.31.orig/drivers/infiniband/hw/nes/nes_verbs.c 2009-11-23 21:59:04.000000000 -0600 +++ linux-2.6.31/drivers/infiniband/hw/nes/nes_verbs.c 2009-11-23 21:59:05.000000000 -0600
@@ -3554,8 +3554,10 @@
        u32 counter;
        u32 total_payload_length;

-       if (nesqp->ibqp_state > IB_QPS_RTS)
-               return -EINVAL;
+       if (nesqp->ibqp_state > IB_QPS_RTS) {
+               err = -EINVAL;
+               goto out;
+       }

        spin_lock_irqsave(&nesqp->lock, flags);

@@ -3618,6 +3620,7 @@

        spin_unlock_irqrestore(&nesqp->lock, flags);

+out:
        if (err)
                *bad_wr = ib_wr;
        return err;

--

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to