summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@mykernel.net>2022-05-29 17:34:55 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2022-06-08 04:05:14 +0200
commitec1e8adcbdf661c57c395bca342945f4f815add7 (patch)
tree12d3ed04548c963e4685d416917067b46011cc48 /drivers
parentscsi: ipr: Fix missing/incorrect resource cleanup in error case (diff)
downloadlinux-ec1e8adcbdf661c57c395bca342945f4f815add7.tar.xz
linux-ec1e8adcbdf661c57c395bca342945f4f815add7.zip
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.net Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/pmcraid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index bfce60183a6e..836ddc476764 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -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;