scsi: mpt3sas: Fix in error path
[ Upstream commit e40c04ade0e2f3916b78211d747317843b11ce10 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4e000daf39
commit
0eb733b53e
@ -12914,8 +12914,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