[PATCH] nvme-fabrics: typo in nvmf_parse_key()

hare at kernel.org hare at kernel.org
Wed Feb 21 05:45:30 PST 2024


From: Hannes Reinecke <hare at suse.de>

Of course we should use the key if there is no error ...

Signed-off-by: Hannes Reinecke <hare at suse.de>
---
 drivers/nvme/host/fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 3499acbf6a82..ab5ac219b70a 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -637,7 +637,7 @@ static struct key *nvmf_parse_key(int key_id)
 	}
 
 	key = key_lookup(key_id);
-	if (!IS_ERR(key))
+	if (IS_ERR(key))
 		pr_err("key id %08x not found\n", key_id);
 	else
 		pr_debug("Using key id %08x\n", key_id);
-- 
2.35.3




More information about the Linux-nvme mailing list