diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-28 21:56:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-09 15:24:20 -0500 |
commit | 0629b407e1855bd34f0b5feb9f9cbffd3416f0fd (patch) | |
tree | d5569cf2e066d4c3d673a19a0a13e32f5d5154a8 | |
parent | 2b25925431bfedfbd1b234afcadbcdf4f09901f8 (diff) |
iser-target: fix error return code in isert_create_device_ib_res()
commit 94a7111043d99819cd0a72d9b3174c7054adb2a0 upstream.
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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 5849dc0726b9..6fc283a041d6 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
@@ -242,21 +242,29 @@ isert_create_device_ib_res(struct isert_device *device) | |||
242 | isert_cq_event_callback, | 242 | isert_cq_event_callback, |
243 | (void *)&cq_desc[i], | 243 | (void *)&cq_desc[i], |
244 | ISER_MAX_RX_CQ_LEN, i); | 244 | ISER_MAX_RX_CQ_LEN, i); |
245 | if (IS_ERR(device->dev_rx_cq[i])) | 245 | if (IS_ERR(device->dev_rx_cq[i])) { |
246 | ret = PTR_ERR(device->dev_rx_cq[i]); | ||
247 | device->dev_rx_cq[i] = NULL; | ||
246 | goto out_cq; | 248 | goto out_cq; |
249 | } | ||
247 | 250 | ||
248 | device->dev_tx_cq[i] = ib_create_cq(device->ib_device, | 251 | device->dev_tx_cq[i] = ib_create_cq(device->ib_device, |
249 | isert_cq_tx_callback, | 252 | isert_cq_tx_callback, |
250 | isert_cq_event_callback, | 253 | isert_cq_event_callback, |
251 | (void *)&cq_desc[i], | 254 | (void *)&cq_desc[i], |
252 | ISER_MAX_TX_CQ_LEN, i); | 255 | ISER_MAX_TX_CQ_LEN, i); |
253 | if (IS_ERR(device->dev_tx_cq[i])) | 256 | if (IS_ERR(device->dev_tx_cq[i])) { |
257 | ret = PTR_ERR(device->dev_tx_cq[i]); | ||
258 | device->dev_tx_cq[i] = NULL; | ||
254 | goto out_cq; | 259 | goto out_cq; |
260 | } | ||
255 | 261 | ||
256 | if (ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP)) | 262 | ret = ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP); |
263 | if (ret) | ||
257 | goto out_cq; | 264 | goto out_cq; |
258 | 265 | ||
259 | if (ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP)) | 266 | ret = ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP); |
267 | if (ret) | ||
260 | goto out_cq; | 268 | goto out_cq; |
261 | } | 269 | } |
262 | 270 | ||