From 9f50e7c244713f4824f129439bcddf694fb91b99 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Mon, 20 Apr 2020 19:14:06 -0700 Subject: [PATCH] lib/nvmf: remove some unreachable code. With the advent of custom transports, it is impossible for this call to fail. fix kw warning #12653 Signed-off-by: Seth Howell Change-Id: Ib1f9d0992e2def9eafd8696310b6c79ab6ac8c78 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1952 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Aleksey Marchuk --- module/event/subsystems/nvmf/conf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/module/event/subsystems/nvmf/conf.c b/module/event/subsystems/nvmf/conf.c index d2c1b7230..57b6d0922 100644 --- a/module/event/subsystems/nvmf/conf.c +++ b/module/event/subsystems/nvmf/conf.c @@ -584,12 +584,7 @@ spdk_nvmf_parse_transport(struct spdk_nvmf_parse_transport_ctx *ctx) return; } - if (spdk_nvme_transport_id_parse_trtype(&trtype, type)) { - SPDK_ERRLOG("Invalid transport type '%s'\n", type); - ctx->cb_fn(-1); - free(ctx); - return; - } + spdk_nvme_transport_id_parse_trtype(&trtype, type); if (spdk_nvmf_tgt_get_transport(g_spdk_nvmf_tgt, type)) { SPDK_ERRLOG("Duplicate transport type '%s'\n", type);