git: 50884a0b09a8 - main - nvmf_transport: Remove invalid assertion

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 10 May 2024 16:41:44 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=50884a0b09a8e02f08d1083efc9722e49b49c71b

commit 50884a0b09a8e02f08d1083efc9722e49b49c71b
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-05-10 16:12:03 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-05-10 16:13:40 +0000

    nvmf_transport: Remove invalid assertion
    
    This is leftover from an earlier iteration of the code where 'nt' was
    not dynamically allocated but was the passed in 'ops' pointer so was
    always alive.
    
    Reported by:    Coverity Scan
    CID:            1545042
    Sponsored by:   Chelsio Communications
---
 sys/dev/nvmf/nvmf_transport.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/dev/nvmf/nvmf_transport.c b/sys/dev/nvmf/nvmf_transport.c
index 14d526192270..ea4aee8cc7ae 100644
--- a/sys/dev/nvmf/nvmf_transport.c
+++ b/sys/dev/nvmf/nvmf_transport.c
@@ -292,8 +292,6 @@ nvmf_transport_module_handler(struct module *mod, int what, void *arg)
 			prev = nt;
 		}
 		if (nt == NULL) {
-			KASSERT(nt->nt_active_qpairs == 0,
-			    ("unregistered transport has connections"));
 			sx_xunlock(&nvmf_transports_lock);
 			return (0);
 		}