legacy/i810/dri: Propagate failure from allocating texture memory

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-01 23:22:31 +01:00
parent 2ea12b56d4
commit 261d086265
1 changed files with 6 additions and 1 deletions

View File

@ -809,7 +809,12 @@ I810DRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
I810AllocLow(&(pI810->TexMem), &(pI810->SysMem), pI810DRI->textureSize);
if (!I810AllocLow(&(pI810->TexMem), &(pI810->SysMem), pI810DRI->textureSize)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"[agp] Texure memory allocation failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->TexMem.Start,
pI810->TexMem.Size, DRM_AGP, 0,