diff options
author | Christoph Fritz <chf.fritz@googlemail.com> | 2010-05-28 10:45:59 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-28 13:57:01 -0400 |
commit | da1fdb02d9200ff28b6f3a380d21930335fe5429 (patch) | |
tree | 0d248099b31416aa6f7adcba5c8a259c6363751b /drivers/ssb/sprom.c | |
parent | 368a07d26ae99c80678a968946744fd83e7708d0 (diff) | |
download | linux-da1fdb02d9200ff28b6f3a380d21930335fe5429.tar.bz2 |
ssb: fix NULL ptr deref when pcihost_wrapper is used
Ethernet driver b44 does register ssb by it's pcihost_wrapper
and doesn't set ssb_chipcommon. A check on this value
introduced with commit d53cdbb94a52a920d5420ed64d986c3523a56743
and ea2db495f92ad2cf3301623e60cb95b4062bc484 triggers:
BUG: unable to handle kernel NULL pointer dereference at 00000010
IP: [<c1266c36>] ssb_is_sprom_available+0x16/0x30
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/sprom.c')
-rw-r--r-- | drivers/ssb/sprom.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ssb/sprom.c b/drivers/ssb/sprom.c index 007bc3a03486..4f7cc8d13277 100644 --- a/drivers/ssb/sprom.c +++ b/drivers/ssb/sprom.c @@ -185,6 +185,7 @@ bool ssb_is_sprom_available(struct ssb_bus *bus) /* this routine differs from specs as we do not access SPROM directly on PCMCIA */ if (bus->bustype == SSB_BUSTYPE_PCI && + bus->chipco.dev && /* can be unavailible! */ bus->chipco.dev->id.revision >= 31) return bus->chipco.capabilities & SSB_CHIPCO_CAP_SPROM; |