Skip to content

Commit e40c04a

Browse files
thenzlmartinkpetersen
authored andcommitted
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>
1 parent a20c435 commit e40c04a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/scsi/mpt3sas/mpt3sas_scsih.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12913,8 +12913,10 @@ _mpt3sas_init(void)
1291312913
mpt3sas_ctl_init(hbas_to_enumerate);
1291412914

1291512915
error = pci_register_driver(&mpt3sas_driver);
12916-
if (error)
12916+
if (error) {
12917+
mpt3sas_ctl_exit(hbas_to_enumerate);
1291712918
scsih_exit();
12919+
}
1291812920

1291912921
return error;
1292012922
}

0 commit comments

Comments
 (0)