diff options
Diffstat (limited to 'drivers/infiniband/ulp/isert/ib_isert.c')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 8a51c3b5d657..468c5e132563 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -350,7 +350,7 @@ isert_create_device_ib_res(struct isert_device *device) dev_attr = &device->dev_attr; ret = isert_query_device(device->ib_device, dev_attr); if (ret) - return ret; + goto out; /* asign function handlers */ if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS && @@ -366,7 +366,7 @@ isert_create_device_ib_res(struct isert_device *device) ret = isert_alloc_comps(device, dev_attr); if (ret) - return ret; + goto out; device->pd = ib_alloc_pd(device->ib_device); if (IS_ERR(device->pd)) { @@ -384,6 +384,9 @@ isert_create_device_ib_res(struct isert_device *device) out_cq: isert_free_comps(device); +out: + if (ret > 0) + ret = -EINVAL; return ret; } |