diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-09-05 11:18:47 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-08 16:31:08 -0400 |
commit | e6c463e3a3d067f5da2c79d5acdb2f626754cdb3 (patch) | |
tree | c469a4411d61f47b4b24387a9d3d87c68648ecd6 /drivers/ssb | |
parent | 69eddc8a37a33479205ac3a3d8575fad1466da90 (diff) | |
download | linux-stable-e6c463e3a3d067f5da2c79d5acdb2f626754cdb3.tar.gz linux-stable-e6c463e3a3d067f5da2c79d5acdb2f626754cdb3.tar.bz2 linux-stable-e6c463e3a3d067f5da2c79d5acdb2f626754cdb3.zip |
ssb: Fail ssb modinit, if attach of the buses failed.
SSB modinit should not succeed, if busattach failed.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb')
-rw-r--r-- | drivers/ssb/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 65a1ed951a1d..8d16cb258ccf 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -1358,8 +1358,10 @@ static int __init ssb_modinit(void) ssb_buses_lock(); err = ssb_attach_queued_buses(); ssb_buses_unlock(); - if (err) + if (err) { bus_unregister(&ssb_bustype); + goto out; + } err = b43_pci_ssb_bridge_init(); if (err) { @@ -1375,7 +1377,7 @@ static int __init ssb_modinit(void) /* don't fail SSB init because of this */ err = 0; } - +out: return err; } /* ssb must be initialized after PCI but before the ssb drivers. |