diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-28 21:56:34 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-12-11 14:54:47 -0500 |
commit | 94a7111043d99819cd0a72d9b3174c7054adb2a0 (patch) | |
tree | 7f176f5808bd9b75d408b1709f0f5f4932a5a4c9 | |
parent | 4454b66cb67f14c33cd70ddcf0ff4985b26324b7 (diff) |
iser-target: fix error return code in isert_create_device_ib_res()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: <stable@vger.kernel.org> #3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 16 |
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 | ||