Commit c58d5161 authored by Yuriy Umanets's avatar Yuriy Umanets Committed by Jim Harris
Browse files

bdev/crypto: Fixed g_session_mp init error handling



In vbdev_crypto_init_crypto_drivers() when g_session_mp init failed it
was possible to jump to cleanup label but return 0 instead of -ENOMEM.

Signed-off-by: default avatarYuriy Umanets <yumanets@nvidia.com>
Change-Id: I128968699b0d2dbb2f769ac5fd7bd53ab409562b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11659


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent bfb676e9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -491,8 +491,8 @@ vbdev_crypto_init_crypto_drivers(void)
			       SOCKET_ID_ANY);
	if (g_session_mp == NULL) {
		SPDK_ERRLOG("Cannot create session pool max size 0x%x\n", max_sess_size);
		rc = -ENOMEM;
		goto error_create_session_mp;
		return -ENOMEM;
	}

	g_mbuf_mp = rte_pktmbuf_pool_create("mbuf_mp", NUM_MBUFS, POOL_CACHE_SIZE,