ARM: OMAP: Fix the use of uninitialized dma_lch_count
authorChen Gang <gang.chen@asianux.com>
Fri, 11 Jan 2013 05:39:18 +0000 (13:39 +0800)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 7 Jun 2015 20:23:56 +0000 (23:23 +0300)
commitf8f7d76872a85cebda68cd0b9c0dcbb7a35ef3eb
tree597c0332a36faaf9191b3584aeffb0d4b3d10876
parent7e0d48a08c817b34136922a3ec7238df90996226
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>
arch/arm/plat-omap/dma.c