From: Stefano Brivio Date: Sun, 6 Apr 2008 15:05:07 +0000 (+0200) Subject: b43legacy: fix bcm4303 crash X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=881400a20c3551e90eed1062cf0387fa686a2fd0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git b43legacy: fix bcm4303 crash This fixes an hard crash which happened upon driver loading on bcm4303 rev. 2 devices. Signed-off-by: Stefano Brivio Signed-off-by: John W. Linville --- 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)