diff options
author | Stefano Brivio <stefano.brivio@polimi.it> | 2008-04-06 17:05:07 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-07 22:19:29 -0400 |
commit | 881400a20c3551e90eed1062cf0387fa686a2fd0 (patch) | |
tree | 0b88fd39614a84a51bbb8430749092f1e5ed162f /drivers/ssb | |
parent | 7981a35ed0f64ca49b1a0c0acecbc9b644a8a2e3 (diff) | |
download | lwn-881400a20c3551e90eed1062cf0387fa686a2fd0.tar.gz lwn-881400a20c3551e90eed1062cf0387fa686a2fd0.zip |
b43legacy: fix bcm4303 crash
This fixes an hard crash which happened upon driver loading on bcm4303 rev.
2 devices.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
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, 6 insertions, 0 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index bedb2b4ee9d2..72017bf2e577 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -1044,6 +1044,12 @@ int ssb_bus_may_powerdown(struct ssb_bus *bus) goto out; cc = &bus->chipco; + + if (!cc->dev) + goto out; + if (cc->dev->id.revision < 5) + goto out; + ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW); err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0); if (err) |