diff options
author | Prakash, Sathya <sathya.prakash@lsi.com> | 2007-07-02 17:04:10 +0530 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-18 11:17:18 -0500 |
commit | 57ce21bfccaf3b24296f1e097682177e49017a57 (patch) | |
tree | 256367708553f6d32c4b2fa84e406f69e5b8b2a4 /drivers/message/fusion/mptspi.c | |
parent | 0c8db6beb81a07147f64cffd33bd43b9e96f4f40 (diff) |
[SCSI] mpt fusion: deregister from transport layer if PCI registration failed
The mptspi and mptsas drivers are modified to deregister from transport layer
if registration with PCI driver failed
Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r-- | drivers/message/fusion/mptspi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 4d2c98104aeb..947fe2901800 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -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; } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |