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 <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 38ce157 commit 2344153

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)