mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
scsi: qla2xxx: Fix a qla24xx_enable_msix() error path
Make sure that the allocated interrupts are freed if allocating memory for the msix_entries array fails. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
dc035d4e93
commit
24afabdbd0
@ -3499,7 +3499,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
|
||||
ql_log(ql_log_fatal, vha, 0x00c8,
|
||||
"Failed to allocate memory for ha->msix_entries.\n");
|
||||
ret = -ENOMEM;
|
||||
goto msix_out;
|
||||
goto free_irqs;
|
||||
}
|
||||
ha->flags.msix_enabled = 1;
|
||||
|
||||
@ -3582,6 +3582,10 @@ msix_register_fail:
|
||||
|
||||
msix_out:
|
||||
return ret;
|
||||
|
||||
free_irqs:
|
||||
pci_free_irq_vectors(ha->pdev);
|
||||
goto msix_out;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
x
Reference in New Issue
Block a user