Commit 23441536 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Keith Busch

nvme-tcp: only evaluate 'tls' option if TLS is selected

We only need to evaluate the 'tls' connect option if TLS is
enabled; otherwise we might be getting a link error.

Fixes: 706add13 ("nvme: keyring: fix conditional compilation")
Reported-by: default avatarkernel test robot <yujie.liu@intel.com>
Closes: https://lore.kernel.org/r/202311140426.0eHrTXBr-lkp@intel.com/Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 38ce1570
...@@ -1916,7 +1916,7 @@ static int nvme_tcp_alloc_admin_queue(struct nvme_ctrl *ctrl) ...@@ -1916,7 +1916,7 @@ static int nvme_tcp_alloc_admin_queue(struct nvme_ctrl *ctrl)
int ret; int ret;
key_serial_t pskid = 0; key_serial_t pskid = 0;
if (ctrl->opts->tls) { if (IS_ENABLED(CONFIG_NVME_TCP_TLS) && ctrl->opts->tls) {
if (ctrl->opts->tls_key) if (ctrl->opts->tls_key)
pskid = key_serial(ctrl->opts->tls_key); pskid = key_serial(ctrl->opts->tls_key);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment