diff options
author | Shivasharan S <shivasharan.srikanteshwara@broadcom.com> | 2018-10-16 23:37:44 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-11-06 20:33:56 -0500 |
commit | 8a25fa17b6ed6e6c8101e9c68a10ae68a9025f2c (patch) | |
tree | e669e8aa4a82768554790f0e2fcbbdb566772a8b /drivers/scsi/megaraid | |
parent | 365597cff94a704c3e7a8031fde39341e7929bf3 (diff) |
scsi: megaraid_sas: Fix goto labels in error handling
During init, if pci_alloc_irq_vectors() fails, the driver has not yet setup
the IRQs. Fix the goto labels and error handling for this case.
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index bcbd3896c295..1aec4366a574 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -5473,7 +5473,7 @@ static int megasas_init_fw(struct megasas_instance *instance) if (!instance->msix_vectors) { i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_LEGACY); if (i < 0) - goto fail_setup_irqs; + goto fail_init_adapter; } megasas_setup_reply_map(instance); @@ -5698,9 +5698,8 @@ fail_start_watchdog: del_timer_sync(&instance->sriov_heartbeat_timer); fail_get_ld_pd_list: instance->instancet->disable_intr(instance); -fail_init_adapter: megasas_destroy_irqs(instance); -fail_setup_irqs: +fail_init_adapter: if (instance->msix_vectors) pci_free_irq_vectors(instance->pdev); instance->msix_vectors = 0; |