X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fbcma%2Fdriver_pci.c;h=c32ebd537abe3a3e5f8f5e777f119c8768c9ea38;hb=424d54d2dca03805942055e5b19926d33a7d1e31;hp=9a96f14c8f474fba41442bbdcbe3bc910a31efc6;hpb=a00b6151a2ae4c52576c35d3998e144a993d50b8;p=~andy%2Flinux diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c index 9a96f14c8f4..c32ebd537ab 100644 --- a/drivers/bcma/driver_pci.c +++ b/drivers/bcma/driver_pci.c @@ -232,17 +232,19 @@ void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc) int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core, bool enable) { - struct pci_dev *pdev = pc->core->bus->host_pci; + struct pci_dev *pdev; u32 coremask, tmp; int err = 0; - if (core->bus->hosttype != BCMA_HOSTTYPE_PCI) { + if (!pc || core->bus->hosttype != BCMA_HOSTTYPE_PCI) { /* This bcma device is not on a PCI host-bus. So the IRQs are * not routed through the PCI core. * So we must not enable routing through the PCI core. */ goto out; } + pdev = pc->core->bus->host_pci; + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp); if (err) goto out;