aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-01-11 13:39:18 +0800
committerTony Lindgren <tony@atomide.com>2013-02-01 14:39:54 -0800
commite78f96060fff8545d21360cfa5590e266a595bb9 (patch)
tree5928ad7afb84bae54dbeb911594252431d7b299e /arch/arm/plat-omap
parentARM: OMAP: make wakeupgen_lock raw (diff)
downloadlinux-dev-e78f96060fff8545d21360cfa5590e266a595bb9.tar.xz
linux-dev-e78f96060fff8545d21360cfa5590e266a595bb9.zip
ARM: OMAP: Fix the use of uninitialized dma_lch_count
'omap_dma_reserve_channels' when used is suppose to be from command. so, it alreay has value before 1st call of omap_system_dma_probe. and it will never be changed again during running (not from ioctl). but 'dma_lch_count' is zero before 1st call of omap_system_dma_probe. so it will be failed for omap_dma_reserve_channels, when 1st call. so, need use 'd->lch_count' instead of 'dma_lch_count' for judging. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 4136b20cba3c..e06c34bdc34a 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2019,7 +2019,7 @@ static int omap_system_dma_probe(struct platform_device *pdev)
errata = p->errata;
if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
- && (omap_dma_reserve_channels <= dma_lch_count))
+ && (omap_dma_reserve_channels < d->lch_count))
d->lch_count = omap_dma_reserve_channels;
dma_lch_count = d->lch_count;