diff options
author | Liu Ying <b17645@freescale.com> | 2010-11-15 10:55:47 +0800 |
---|---|---|
committer | Lily Zhang <r58066@freescale.com> | 2010-11-16 16:05:26 +0800 |
commit | 9af20dcb48ba7a45001608e221c8395238ef10bc (patch) | |
tree | 1b43afbf98a5e612048e3b76454a53a3b5400c63 | |
parent | cfec4caaba05e44c9ccd3a9b44d818cfe0f8b7b5 (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>
(cherry picked from commit 020fa3509623f49aa759fb47864b70eb017403f8)
-rw-r--r-- | drivers/mxc/vpu/mxc_vpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c index 2be6fa6a649..e4ba1e10f43 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; } |