Skip to content

Commit

Permalink
nvme-tcp: only evaluate 'tls' option if TLS is selected
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hannes Reinecke authored and Keith Busch committed Nov 20, 2023
1 parent 38ce157 commit 2344153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2344153

Please sign in to comment.