[PATCH] nvme-fc: fix error loop in create_hw_io_queues
Hannes Reinecke
hare at suse.de
Mon Oct 19 06:04:00 EDT 2020
On 10/16/20 11:06 PM, James Smart wrote:
> The loop that backs out of hw io queue creation continues through index
> 0, which corresponds to the admin queue as well.
>
> Fix the loop so it only proceeds through indexes 1..n which correspond to
> io queues.
>
> Signed-off-by: James Smart <james.smart at broadcom.com>
> ---
> drivers/nvme/host/fc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index e2e09e25c056..f002522146e2 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
> return 0;
>
> delete_queues:
> - for (; i >= 0; i--)
> + for (; i > 0; i--)
> __nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i);
> return ret;
> }
>
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
More information about the Linux-nvme
mailing list