Fix return value when local memory alloc fails

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Ben Goz <ben.goz@amd.com>


[ROCm/ROCR-Runtime commit: ac56c6baff]
Tá an tiomantas seo le fáil i:
Oded Gabbay tiomanta 2015-03-19 10:49:27 +02:00
1 tuismitheoir 996785d178
tiomantas 21f01aaf02
1 comhad athraithe
+3
+3
Féach ar an gComhad
@@ -547,6 +547,9 @@ void *fmm_allocate_device(uint32_t gpu_id, uint64_t MemorySizeInBytes)
pthread_mutex_lock(&aperture->fmm_mutex);
aperture_release_area(aperture, mem, MemorySizeInBytes);
pthread_mutex_unlock(&aperture->fmm_mutex);
/* Assign NULL to mem to indicate failure to calling function */
mem = NULL;
}
return mem;