mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 14:05:19 +08:00
scsi: pmcraid: Fix missing resource cleanup in error case
[ Upstream commit ec1e8adcbd
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d3b3950b00
commit
41b2185bcb
@ -4526,7 +4526,7 @@ pmcraid_register_interrupt_handler(struct pmcraid_instance *pinstance)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_unwind:
|
out_unwind:
|
||||||
while (--i > 0)
|
while (--i >= 0)
|
||||||
free_irq(pci_irq_vector(pdev, i), &pinstance->hrrq_vector[i]);
|
free_irq(pci_irq_vector(pdev, i), &pinstance->hrrq_vector[i]);
|
||||||
pci_free_irq_vectors(pdev);
|
pci_free_irq_vectors(pdev);
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
Reference in New Issue
Block a user