From: Janusz Sobczak Date: Mon, 9 Aug 2010 11:22:59 +0000 (+0200) Subject: gpu: pvr: Check OSAllocMem return value. X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb438e3a8d424637c148be5dd92d9f6374e85821;p=sgx.git gpu: pvr: Check OSAllocMem return value. Signed-off-by: Janusz Sobczak Signed-off-by: Imre Deak --- diff --git a/pvr/mmu.c b/pvr/mmu.c index 3e7096a..728e735 100644 --- a/pvr/mmu.c +++ b/pvr/mmu.c @@ -499,9 +499,9 @@ enum PVRSRV_ERROR MMU_Initialise(struct PVRSRV_DEVICE_NODE *psDeviceNode, return PVRSRV_ERROR_GENERIC; } - OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, - sizeof(struct MMU_CONTEXT), (void **) &psMMUContext, NULL); - if (psMMUContext == NULL) { + if (OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, + sizeof(struct MMU_CONTEXT), (void **) &psMMUContext, NULL) + != PVRSRV_OK) { PVR_DPF(PVR_DBG_ERROR, "MMU_Initialise: ERROR call to OSAllocMem failed"); return PVRSRV_ERROR_GENERIC;