diff options
author | Tomas Henzl <thenzl@redhat.com> | 2023-10-15 13:45:29 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-10-17 03:04:54 +0200 |
commit | e40c04ade0e2f3916b78211d747317843b11ce10 (patch) | |
tree | 76495f6202e1dfd8960181fde48785459c43e041 /drivers/scsi/mpt3sas | |
parent | scsi: ufs: core: Correct clear TM error log (diff) | |
download | linux-e40c04ade0e2f3916b78211d747317843b11ce10.tar.xz linux-e40c04ade0e2f3916b78211d747317843b11ce10.zip |
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>
Diffstat (limited to 'drivers/scsi/mpt3sas')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index c3c1f466fe01..605013d3ee83 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -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; } |