mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 01:54:09 +08:00
scsi: mpt3sas: Fix in error path
The driver should be deregistered as misc driver after PCI registration failure. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Link: https://lore.kernel.org/r/20231015114529.10725-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
a20c4350c6
commit
e40c04ade0
@ -12913,8 +12913,10 @@ _mpt3sas_init(void)
|
||||
mpt3sas_ctl_init(hbas_to_enumerate);
|
||||
|
||||
error = pci_register_driver(&mpt3sas_driver);
|
||||
if (error)
|
||||
if (error) {
|
||||
mpt3sas_ctl_exit(hbas_to_enumerate);
|
||||
scsih_exit();
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user