Skip to content

Commit

Permalink
scsi: pmcraid: Fix missing resource cleanup in error case
Browse files Browse the repository at this point in the history
Fix missing resource cleanup (when '(--i) == 0') for error case in
pmcraid_register_interrupt_handler().

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Chengguang Xu <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
cgxu519 authored and martinkpetersen committed Jun 8, 2022
1 parent d64c491 commit ec1e8ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/pmcraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec1e8ad

Please sign in to comment.