Skip to content

Commit

Permalink
I think that if a PCI bus is a root bus, attached to a host bridge not a
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Nov 23, 2005
1 parent 1778d55 commit bd07ed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/drm/mga_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int mga_driver_device_is_agp(drm_device_t * dev)
* device.
*/

if ((pdev->device == 0x0525)
if ((pdev->device == 0x0525) && pdev->bus->self
&& (pdev->bus->self->vendor == 0x3388)
&& (pdev->bus->self->device == 0x0021)) {
return 0;
Expand Down

0 comments on commit bd07ed2

Please sign in to comment.