Skip to contentSkip to conversation

nvme-fabrics: typo in nvmf_parse_key()

PATCH Applied [email protected] 3 participants 3 messages Feb 21, 2024 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-fabrics: typo in nvmf_parse_key()

From: Hannes Reinecke <[email protected]>

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

---
 drivers/nvme/host/fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/fabrics.c +1 -1
index 3499acbf6a82..ab5ac219b70a 100644
@@ -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);
Signature · 1 line
2.35.3
maintainer Applied
#2 lore raw
In reply to [email protected]
Quoted 3 lines · On Wed, Feb 21, 2024 at 02:45:30PM +0100, [email protected] wrote:

From: Hannes Reinecke <[email protected]>

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

Fortunately the part that mattered handles the error correctly, but printing the wrong message is confusing.

Applied to nvme-6.8, thanks!

Quoted 21 lines
---
 drivers/nvme/host/fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/fabrics.c +1 -1
index 3499acbf6a82..ab5ac219b70a 100644
@@ -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);
Signature · 1 line
2.35.3