sna: Check the bus type before declaring probe success

This should never fail, but still better to fail during detection rather
than pretend it works.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-05-25 14:28:56 +01:00
parent 4094826aee
commit a5fe863e3f
1 changed files with 2 additions and 3 deletions

View File

@ -402,6 +402,8 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
return FALSE;
pEnt = xf86GetEntityInfo(scrn->entityList[0]);
if (pEnt->location.type != BUS_PCI)
return FALSE;
if (flags & PROBE_DETECT)
return TRUE;
@ -419,9 +421,6 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
scrn->displayWidth = 640; /* default it */
if (sna->pEnt->location.type != BUS_PCI)
return FALSE;
sna->PciInfo = xf86GetPciInfoForEntity(sna->pEnt->index);
fd = sna_open_drm_master(scrn);