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

Keith Busch kbusch at kernel.org
Wed Feb 21 10:08:36 PST 2024


On Wed, Feb 21, 2024 at 02:45:30PM +0100, hare at kernel.org wrote:
> From: Hannes Reinecke <hare at suse.de>
> 
> 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!
 
> 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