|
@@ -1524,6 +1524,8 @@ static struct pci_driver mptspi_driver = {
|
|
|
static int __init
|
|
|
mptspi_init(void)
|
|
|
{
|
|
|
+ int error;
|
|
|
+
|
|
|
show_mptmod_ver(my_NAME, my_VERSION);
|
|
|
|
|
|
mptspi_transport_template = spi_attach_transport(&mptspi_transport_functions);
|
|
@@ -1544,7 +1546,11 @@ mptspi_init(void)
|
|
|
": Registered for IOC reset notifications\n"));
|
|
|
}
|
|
|
|
|
|
- return pci_register_driver(&mptspi_driver);
|
|
|
+ error = pci_register_driver(&mptspi_driver);
|
|
|
+ if (error)
|
|
|
+ spi_release_transport(mptspi_transport_template);
|
|
|
+
|
|
|
+ return error;
|
|
|
}
|
|
|
|
|
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|