aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 613be2ef9c52..64ab5fc7cca3 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1176,9 +1176,11 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
1176 break; 1176 break;
1177 } 1177 }
1178 1178
1179 target->status = srp_alloc_iu_bufs(target); 1179 if (!target->rx_ring[0]) {
1180 if (target->status) 1180 target->status = srp_alloc_iu_bufs(target);
1181 break; 1181 if (target->status)
1182 break;
1183 }
1182 1184
1183 qp_attr = kmalloc(sizeof *qp_attr, GFP_KERNEL); 1185 qp_attr = kmalloc(sizeof *qp_attr, GFP_KERNEL);
1184 if (!qp_attr) { 1186 if (!qp_attr) {