From bb438e3a8d424637c148be5dd92d9f6374e85821 Mon Sep 17 00:00:00 2001 From: Janusz Sobczak Date: Mon, 9 Aug 2010 13:22:59 +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 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; -- 2.39.5