mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 12:41:26 +00:00
isert: Do not leak workqueues if ib_create_cq failed
Signed-off-by: Yan Burman <yanb@mellanox.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5868 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -856,6 +856,7 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev)
|
||||
cqe_num,
|
||||
i); /* completion vector */
|
||||
if (unlikely(IS_ERR(cq))) {
|
||||
cq_desc->cq = NULL;
|
||||
err = PTR_ERR(cq);
|
||||
pr_err("Failed to create iser dev cq, err:%d\n", err);
|
||||
goto fail_cq;
|
||||
@@ -883,7 +884,7 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev)
|
||||
return isert_dev;
|
||||
|
||||
fail_cq:
|
||||
for (j = 0; j < i; ++j) {
|
||||
for (j = 0; j <= i; ++j) {
|
||||
if (isert_dev->cq_desc[j].cq)
|
||||
ib_destroy_cq(isert_dev->cq_desc[j].cq);
|
||||
if (isert_dev->cq_desc[j].cq_workqueue)
|
||||
|
||||
Reference in New Issue
Block a user