summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChoi, Jong-Hwan <jhbird.choi@samsung.com>2011-11-20 09:53:08 +0800
committerAndy Green <andy.green@linaro.org>2011-11-20 10:17:52 +0800
commit47c9796e6601d72bdf3de4151f59ad3f15c179d8 (patch)
tree87bfd6bf5bc1a64b08ed1d4122857b0ed42ac6cf /drivers
parent92950152ac7bae2ef0854626590911110409114d (diff)
gpu: ion: Fix deferencing ERR_PTR
Change-Id: I986c380d75591571890f1a2cba1405e66789b25c Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/ion/ion_heap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/ion/ion_heap.c b/drivers/gpu/ion/ion_heap.c
index 7c93577c9b3..8ce3c1907ba 100644
--- a/drivers/gpu/ion/ion_heap.c
+++ b/drivers/gpu/ion/ion_heap.c
@@ -37,10 +37,13 @@ struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data)
heap_data->type);
return ERR_PTR(-EINVAL);
}
- if (IS_ERR_OR_NULL(heap))
+
+ if (IS_ERR_OR_NULL(heap)) {
pr_err("%s: error creating heap %s type %d base %lu size %u\n",
__func__, heap_data->name, heap_data->type,
heap_data->base, heap_data->size);
+ return ERR_PTR(-EINVAL);
+ }
heap->name = heap_data->name;
heap->id = heap_data->id;