I think that if a PCI bus is a root bus, attached to a host bridge not a PCI->PCI bridge, then bus->self is allowed to be NULL. Certainly that's the case on my Pegasos, and it makes the MGA DRM driver oops...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

authored by Dave Airlie and committed by Dave Airlie bd07ed2b 1778d55e

+1 -1
+1 -1
drivers/char/drm/mga_drv.c
··· 161 * device. 162 */ 163 164 - if ((pdev->device == 0x0525) 165 && (pdev->bus->self->vendor == 0x3388) 166 && (pdev->bus->self->device == 0x0021)) { 167 return 0;
··· 161 * device. 162 */ 163 164 + if ((pdev->device == 0x0525) && pdev->bus->self 165 && (pdev->bus->self->vendor == 0x3388) 166 && (pdev->bus->self->device == 0x0021)) { 167 return 0;