mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue