summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-06-19 04:40:09 +0200
committerRoland Dreier <roland@purestorage.com>2013-06-20 13:52:04 +0200
commitf29fa1cf340e21085672ccfeb6d66f292208567e (patch)
tree45f6984b8541cdfacc9793450ef69e1dc680b09a /drivers/infiniband
parentndisc: Convert use of typedef ctl_table to struct ctl_table (diff)
downloadlinux-f29fa1cf340e21085672ccfeb6d66f292208567e.tar.xz
linux-f29fa1cf340e21085672ccfeb6d66f292208567e.zip
IB/ehca: Fix error return code in ehca_create_slab_caches()
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index f8a62918a88d..8f43093edace 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