ARM: OMAP: Fix the use of uninitialized dma_lch_count
[pandora-kernel.git] / arch / arm / plat-omap / dma.c
index 78f45de..d6bf94f 100644 (file)
@@ -2013,7 +2013,7 @@ static int __devinit 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;