Skip to contentSkip to conversation

mpt3sas: fix in error path

PATCH Applied Tomas Henzl 2 participants 2 messages Oct 15, 2023 – Oct 17, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpt3sas: fix in error path

The driver should be deregistered as misc driver.

---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +3 -1
index 9af7a7e24474..107e608e2c41 100644
@@ -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;
 }
Signature · 1 line
2.41.0
#1 lore raw

Tomas,

Quoted 1 line

The driver should be deregistered as misc driver.

Applied to 6.6/scsi-fixes, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering