aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 6be57c38638d..78f6e92c571f 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -264,21 +264,29 @@ isert_create_device_ib_res(struct isert_device *device)
264 isert_cq_event_callback, 264 isert_cq_event_callback,
265 (void *)&cq_desc[i], 265 (void *)&cq_desc[i],
266 ISER_MAX_RX_CQ_LEN, i); 266 ISER_MAX_RX_CQ_LEN, i);
267 if (IS_ERR(device->dev_rx_cq[i])) 267 if (IS_ERR(device->dev_rx_cq[i])) {
268 ret = PTR_ERR(device->dev_rx_cq[i]);
269 device->dev_rx_cq[i] = NULL;
268 goto out_cq; 270 goto out_cq;
271 }
269 272
270 device->dev_tx_cq[i] = ib_create_cq(device->ib_device, 273 device->dev_tx_cq[i] = ib_create_cq(device->ib_device,
271 isert_cq_tx_callback, 274 isert_cq_tx_callback,
272 isert_cq_event_callback, 275 isert_cq_event_callback,
273 (void *)&cq_desc[i], 276 (void *)&cq_desc[i],
274 ISER_MAX_TX_CQ_LEN, i); 277 ISER_MAX_TX_CQ_LEN, i);
275 if (IS_ERR(device->dev_tx_cq[i])) 278 if (IS_ERR(device->dev_tx_cq[i])) {
279 ret = PTR_ERR(device->dev_tx_cq[i]);
280 device->dev_tx_cq[i] = NULL;
276 goto out_cq; 281 goto out_cq;
282 }
277 283
278 if (ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP)) 284 ret = ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP);
285 if (ret)
279 goto out_cq; 286 goto out_cq;
280 287
281 if (ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP)) 288 ret = ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP);
289 if (ret)
282 goto out_cq; 290 goto out_cq;
283 } 291 }
284 292