Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[cascardo/linux.git] / drivers / infiniband / ulp / isert / ib_isert.c
index abb3124..f121e61 100644 (file)
@@ -346,7 +346,7 @@ isert_create_device_ib_res(struct isert_device *device)
 
        ret = isert_alloc_comps(device);
        if (ret)
-               return ret;
+               goto out;
 
        device->pd = ib_alloc_pd(ib_dev);
        if (IS_ERR(device->pd)) {
@@ -364,6 +364,9 @@ isert_create_device_ib_res(struct isert_device *device)
 
 out_cq:
        isert_free_comps(device);
+out:
+       if (ret > 0)
+               ret = -EINVAL;
        return ret;
 }