Skip to contentSkip to conversation

nvme-tcp: remove redundant check to ctrl->opts

PATCH Applied Hannes Reinecke 4 participants 4 messages Apr 15, 2025 – Apr 22, 2025 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-tcp: remove redundant check to ctrl->opts

When checking for secure concatenation we have already validated that 'ctrl->opts' is set, so we can remove this check.

---
 drivers/nvme/host/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/tcp.c +1 -1
index 72d260201d8c..e20a994d63c2 100644
@@ -2358,7 +2358,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
 	if (ret)
 		return ret;
 
-	if (ctrl->opts && ctrl->opts->concat && !ctrl->tls_pskid) {
+	if (ctrl->opts->concat && !ctrl->tls_pskid) {
 		/* See comments for nvme_tcp_key_revoke_needed() */
 		dev_dbg(ctrl->device, "restart admin queue for secure concatenation\n");
 		nvme_stop_keep_alive(ctrl);
Signature · 1 line
2.35.3