aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r--drivers/message/fusion/mptspi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 6b3e0c00952b..947fe2901800 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -821,6 +821,7 @@ static struct scsi_host_template mptspi_driver_template = {
821 .max_sectors = 8192, 821 .max_sectors = 8192,
822 .cmd_per_lun = 7, 822 .cmd_per_lun = 7,
823 .use_clustering = ENABLE_CLUSTERING, 823 .use_clustering = ENABLE_CLUSTERING,
824 .shost_attrs = mptscsih_host_attrs,
824}; 825};
825 826
826static int mptspi_write_spi_device_pg1(struct scsi_target *starget, 827static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
@@ -1523,6 +1524,8 @@ static struct pci_driver mptspi_driver = {
1523static int __init 1524static int __init
1524mptspi_init(void) 1525mptspi_init(void)
1525{ 1526{
1527 int error;
1528
1526 show_mptmod_ver(my_NAME, my_VERSION); 1529 show_mptmod_ver(my_NAME, my_VERSION);
1527 1530
1528 mptspi_transport_template = spi_attach_transport(&mptspi_transport_functions); 1531 mptspi_transport_template = spi_attach_transport(&mptspi_transport_functions);
@@ -1543,7 +1546,11 @@ mptspi_init(void)
1543 ": Registered for IOC reset notifications\n")); 1546 ": Registered for IOC reset notifications\n"));
1544 } 1547 }
1545 1548
1546 return pci_register_driver(&mptspi_driver); 1549 error = pci_register_driver(&mptspi_driver);
1550 if (error)
1551 spi_release_transport(mptspi_transport_template);
1552
1553 return error;
1547} 1554}
1548 1555
1549/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1556/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/