summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorHiroshi DOYU <hdoyu@nvidia.com>2012-01-05 10:57:43 +0200
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-12 09:14:56 -0800
commit7d1d90ab2f68b6bde33c802040c7ae32fa4c454f (patch)
tree9db6b1828f7839e0b9623e45b22b2fbaffc0c718 /drivers/gpu
parent609eb320c69b130eb7bbd4b0398ea6ce6c85bbfc (diff)
gpu: ion: tegra: Ignore unsupported heap with printing warning
Instead of rewinding and returning error for unsupported heap, continuie to next heap with printing warning. If some kind of heap isn't supported, it doesn't have to cancel Ion memory manager itself. Change-Id: I0d2c8dc1b9fc69318309f90dc657b10a3bd866bb Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/73607 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/ion/tegra/tegra_ion.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/ion/tegra/tegra_ion.c b/drivers/gpu/ion/tegra/tegra_ion.c
index ab5f3f923f8b..a750a22f404b 100644
--- a/drivers/gpu/ion/tegra/tegra_ion.c
+++ b/drivers/gpu/ion/tegra/tegra_ion.c
@@ -297,7 +297,6 @@ static long tegra_ion_ioctl(struct ion_client *client,
int tegra_ion_probe(struct platform_device *pdev)
{
struct ion_platform_data *pdata = pdev->dev.platform_data;
- int err;
int i;
num_heaps = pdata->nr;
@@ -316,8 +315,10 @@ int tegra_ion_probe(struct platform_device *pdev)
heaps[i] = ion_heap_create(heap_data);
if (IS_ERR_OR_NULL(heaps[i])) {
- err = PTR_ERR(heaps[i]);
- goto err;
+ pr_warn("%s(type:%d id:%d) isn't supported\n",
+ heap_data->name,
+ heap_data->type, heap_data->id);
+ continue;
}
ion_device_add_heap(idev, heaps[i]);
}
@@ -326,13 +327,6 @@ int tegra_ion_probe(struct platform_device *pdev)
nvmap_dev = (struct nvmap_device *)idev;
#endif
return 0;
-err:
- for (i = 0; i < num_heaps; i++) {
- if (heaps[i])
- ion_heap_destroy(heaps[i]);
- }
- kfree(heaps);
- return err;
}
int tegra_ion_remove(struct platform_device *pdev)