From cf3ae8d6b4911473cc4798d88a209931ef8edf6d Mon Sep 17 00:00:00 2001 From: Janusz Sobczak Date: Mon, 9 Aug 2010 13:23:07 +0200 Subject: [PATCH] gpu: pvr: Check OSAllocMem return value. Signed-off-by: Janusz Sobczak Signed-off-by: Imre Deak --- pvr/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pvr/mmu.c b/pvr/mmu.c index 728e735..d93e9ff 100644 --- a/pvr/mmu.c +++ b/pvr/mmu.c @@ -815,9 +815,9 @@ struct MMU_HEAP *MMU_Create(struct MMU_CONTEXT *psMMUContext, return NULL; } - OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, - sizeof(struct MMU_HEAP), (void **)&pMMUHeap, NULL); - if (pMMUHeap == NULL) { + if (OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, + sizeof(struct MMU_HEAP), (void **)&pMMUHeap, NULL) + != PVRSRV_OK) { PVR_DPF(PVR_DBG_ERROR, "MMU_Create: ERROR call to OSAllocMem failed"); return NULL; -- 2.39.5