Skip to content

Commit 2344153

Browse files
hreineckekeithbusch
authored andcommitted
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: 706add1 ("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>
1 parent 38ce157 commit 2344153

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ static int nvme_tcp_alloc_admin_queue(struct nvme_ctrl *ctrl)
19161916
int ret;
19171917
key_serial_t pskid = 0;
19181918

1919-
if (ctrl->opts->tls) {
1919+
if (IS_ENABLED(CONFIG_NVME_TCP_TLS) && ctrl->opts->tls) {
19201920
if (ctrl->opts->tls_key)
19211921
pskid = key_serial(ctrl->opts->tls_key);
19221922
else

0 commit comments

Comments
 (0)