diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-01 23:22:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-02 08:38:21 +0100 |
commit | 261d086265fff6c9b28a67d2fcceed8f107d5cb0 (patch) | |
tree | 2466498a23dce90d0723d46746b0752b9613c877 | |
parent | 2ea12b56d42686f75deb33fc126d09acee7e2899 (diff) |
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>
-rw-r--r-- | src/legacy/i810/i810_dri.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/legacy/i810/i810_dri.c b/src/legacy/i810/i810_dri.c index 2b3f1e19..28a3b919 100644 --- a/src/legacy/i810/i810_dri.c +++ b/src/legacy/i810/i810_dri.c @@ -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, |