mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 17:40:54 +07:00
scsi: megaraid_sas: fix error handle in megasas_probe_one
megasas_mgmt_info.max_index has increased by 1 before megasas_io_attach, if megasas_io_attach return error, then goto fail_io_attach, megasas_mgmt_info.instance has a wrong index here. So first reduce max_index and then set that instance to NULL. Signed-off-by: weiping zhang <zhangweiping@didichuxing.com> Acked-by: Sumit Saxena <sumit.saxena@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
424f727b94
commit
61f0c3c7a0
@ -6228,8 +6228,8 @@ static int megasas_probe_one(struct pci_dev *pdev,
|
||||
fail_start_aen:
|
||||
fail_io_attach:
|
||||
megasas_mgmt_info.count--;
|
||||
megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = NULL;
|
||||
megasas_mgmt_info.max_index--;
|
||||
megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = NULL;
|
||||
|
||||
instance->instancet->disable_intr(instance);
|
||||
megasas_destroy_irqs(instance);
|
||||
|
Loading…
Reference in New Issue
Block a user