Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88d1aa03 authored by Tomas Henzl's avatar Tomas Henzl Committed by Greg Kroah-Hartman
Browse files

scsi: mpt3sas: Fix in error path



[ Upstream commit e40c04ade0e2f3916b78211d747317843b11ce10 ]

The driver should be deregistered as misc driver after PCI registration
failure.

Signed-off-by: default avatarTomas Henzl <thenzl@redhat.com>
Link: https://lore.kernel.org/r/20231015114529.10725-1-thenzl@redhat.com


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b1f62e3e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -11138,8 +11138,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;
}