Commit ec1e8adc authored by Chengguang Xu's avatar Chengguang Xu Committed by Martin K. Petersen

scsi: pmcraid: Fix missing resource cleanup in error case

Fix missing resource cleanup (when '(--i) == 0') for error case in
pmcraid_register_interrupt_handler().

Link: https://lore.kernel.org/r/20220529153456.4183738-6-cgxu519@mykernel.netReviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarChengguang Xu <cgxu519@mykernel.net>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d64c4919
......@@ -4031,7 +4031,7 @@ pmcraid_register_interrupt_handler(struct pmcraid_instance *pinstance)
return 0;
out_unwind:
while (--i > 0)
while (--i >= 0)
free_irq(pci_irq_vector(pdev, i), &pinstance->hrrq_vector[i]);
pci_free_irq_vectors(pdev);
return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment