summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorLiu Ying <b17645@freescale.com>2010-11-15 10:55:47 +0800
committerAndy Voltz <andy.voltz@timesys.com>2011-06-01 13:19:46 -0400
commit2921bc936a422150b59b0f51811f34d6f382d596 (patch)
tree0dbf062520303f89ab6a79d6b6b98f03108d44c1 /drivers/mxc
parent84bd9dc44f748ef68f4b4f86445191431c3e1a2a (diff)
ENGR00133681 VPU:Fix kernel dump when VPU doesn't use IRAM
If VPU doesn't use IRAM, there will be a kernel dump when we enter VPU driver probe function. This issue is caused by allocating IRAM with zero buffer size. Signed-off-by: Liu Ying <b17645@freescale.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/vpu/mxc_vpu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c
index 2be6fa6a6496..e4ba1e10f43d 100644
--- a/drivers/mxc/vpu/mxc_vpu.c
+++ b/drivers/mxc/vpu/mxc_vpu.c
@@ -582,7 +582,8 @@ static int vpu_dev_probe(struct platform_device *pdev)
vpu_plat = pdev->dev.platform_data;
- iram_alloc(VPU_IRAM_SIZE, &addr);
+ if (VPU_IRAM_SIZE)
+ iram_alloc(VPU_IRAM_SIZE, &addr);
if (addr == 0)
iram.start = iram.end = 0;
else {
@@ -664,7 +665,8 @@ static int vpu_dev_remove(struct platform_device *pdev)
{
free_irq(vpu_irq, &vpu_data);
iounmap(vpu_base);
- iram_free(iram.start, VPU_IRAM_SIZE);
+ if (VPU_IRAM_SIZE)
+ iram_free(iram.start, VPU_IRAM_SIZE);
return 0;
}