[arm]: tegra: dma: DMA error debugging.
authorMike Corrigan <michael.corrigan@motorola.com>
Thu, 14 Oct 2010 18:56:13 +0000 (13:56 -0500)
committerColin Cross <ccross@android.com>
Thu, 14 Oct 2010 23:07:43 +0000 (16:07 -0700)
Print an error message when a DMA channel cannot be allocated.

Change-Id: I93a96851ac12c5ea66b2fb053033aa4260c2178a
Signed-off-by: Mike Corrigan <michael.corrigan@motorola.com>
arch/arm/mach-tegra/dma.c

index 87309818d254701e247e06fea30e7b038fd8813c..163993bfa816c0d82226b05a24e9db2e86fad1ac 100644 (file)
@@ -341,7 +341,7 @@ EXPORT_SYMBOL(tegra_dma_enqueue_req);
 struct tegra_dma_channel *tegra_dma_allocate_channel(int mode)
 {
        int channel;
-       struct tegra_dma_channel *ch = NULL;;
+       struct tegra_dma_channel *ch = NULL;
 
        mutex_lock(&tegra_dma_lock);
 
@@ -351,8 +351,10 @@ struct tegra_dma_channel *tegra_dma_allocate_channel(int mode)
        } else {
                channel = find_first_zero_bit(channel_usage,
                        ARRAY_SIZE(dma_channels));
-               if (channel >= ARRAY_SIZE(dma_channels))
+               if (channel >= ARRAY_SIZE(dma_channels)) {
+                       pr_err("%s: failed to allocate a DMA channel",__func__);
                        goto out;
+               }
        }
        __set_bit(channel, channel_usage);
        ch = &dma_channels[channel];