fbdev: make entity fail if PCI claimed already.

bad kitty fbdev, been shipping this in Fedora for a while now
This commit is contained in:
Dave Airlie 2008-03-13 16:16:46 +10:00 committed by Dave Airlie
parent 3efb23a6c4
commit aef6b904eb
2 changed files with 10 additions and 0 deletions

View File

@ -428,6 +428,9 @@ xf86GetEntityInfo(int entityIndex)
EntityInfoPtr pEnt;
int i;
if (entityIndex == -1)
return NULL;
if (entityIndex >= xf86NumEntities)
return NULL;

View File

@ -57,6 +57,13 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
{
EntityPtr p;
int num;
if (pciSlotClaimed)
return -1;
#if defined(__sparc__) || defined (__sparc64__)
if (sbusSlotClaimed)
return -1;
#endif
num = xf86AllocateEntity();
p = xf86Entities[num];