From: Wei Yongjun <[email protected]>

Fix to return -ENOMEM in the kmem_cache_create() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
---
 drivers/infiniband/hw/ehca/ehca_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/ehca/ehca_main.c 
b/drivers/infiniband/hw/ehca/ehca_main.c
index f8a6291..8f43093 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -211,6 +211,7 @@ static int ehca_create_slab_caches(void)
        if (!ctblk_cache) {
                ehca_gen_err("Cannot create ctblk SLAB cache.");
                ehca_cleanup_small_qp_cache();
+               ret = -ENOMEM;
                goto create_slab_caches6;
        }
 #endif

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to