module/bdev_nvme: Fix some unreachable code.
All of the error cases for spdk_nvme_transport_id_parse_trtype were covered earlier, so just make this an assert. fix kw warning 12653. Signed-off-by: Seth Howell <seth.howell@intel.com> Change-Id: If0eea934764b35d097887b98b0441ae5d7dd3e4f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1953 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
9f50e7c244
commit
d8343f9496
@ -282,12 +282,7 @@ spdk_rpc_bdev_nvme_attach_controller(struct spdk_jsonrpc_request *request,
|
||||
|
||||
/* Parse trtype */
|
||||
rc = spdk_nvme_transport_id_parse_trtype(&trid.trtype, ctx->req.trtype);
|
||||
if (rc < 0) {
|
||||
SPDK_ERRLOG("Failed to parse trtype: %s\n", ctx->req.trtype);
|
||||
spdk_jsonrpc_send_error_response_fmt(request, -EINVAL, "Failed to parse trtype: %s",
|
||||
ctx->req.trtype);
|
||||
goto cleanup;
|
||||
}
|
||||
assert(rc == 0);
|
||||
|
||||
/* Parse traddr */
|
||||
snprintf(trid.traddr, sizeof(trid.traddr), "%s", ctx->req.traddr);
|
||||
|
Loading…
Reference in New Issue
Block a user