diff options
author | Choi, Jong-Hwan <jhbird.choi@samsung.com> | 2011-07-07 09:07:04 +0900 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:38:47 -0800 |
commit | 6ef1187c57335e8eda81d219cc915c690165065e (patch) | |
tree | c585d7f5219727af2d27d94d0c1f05afca373721 /drivers/gpu | |
parent | 6ff63c17c20f2631dfca65b64e8f3488dd99f151 (diff) |
gpu: ion: Fix deferencing ERR_PTR
Change-Id: I986c380d75591571890f1a2cba1405e66789b25c
Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/ion/ion_heap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/ion/ion_heap.c b/drivers/gpu/ion/ion_heap.c index 7c93577c9b3c..8ce3c1907bad 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; |