diff options
author | Hannes Reinecke <hare@suse.de> | 2023-11-14 14:18:21 +0100 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2023-11-20 18:25:32 +0100 |
commit | 23441536b63677cb2ed9b1637d8ca70315e44bd0 (patch) | |
tree | b2bbd656935ffcd8e80154fc8606e9dcd17742f7 /drivers/nvme/host/tcp.c | |
parent | nvme-auth: set explanation code for failure2 msgs (diff) | |
download | linux-23441536b63677cb2ed9b1637d8ca70315e44bd0.tar.xz linux-23441536b63677cb2ed9b1637d8ca70315e44bd0.zip |
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: 706add13676d ("nvme: keyring: fix conditional compilation")
Reported-by: kernel test robot <yujie.liu@intel.com>
Closes: https://lore.kernel.org/r/202311140426.0eHrTXBr-lkp@intel.com/
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
-rw-r--r-- | drivers/nvme/host/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 89661a9cf850..6ed794815517 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1916,7 +1916,7 @@ static int nvme_tcp_alloc_admin_queue(struct nvme_ctrl *ctrl) int ret; key_serial_t pskid = 0; - if (ctrl->opts->tls) { + if (IS_ENABLED(CONFIG_NVME_TCP_TLS) && ctrl->opts->tls) { if (ctrl->opts->tls_key) pskid = key_serial(ctrl->opts->tls_key); else |