From: Mike Corrigan Date: Thu, 14 Oct 2010 18:56:13 +0000 (-0500) Subject: [arm]: tegra: dma: DMA error debugging. X-Git-Tag: firefly_0821_release~9833^2~153^2~1 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=43ca7cdda2e511be7d19c3bdbc437e471b7e8f7e;p=firefly-linux-kernel-4.4.55.git [arm]: tegra: dma: DMA error debugging. Print an error message when a DMA channel cannot be allocated. Change-Id: I93a96851ac12c5ea66b2fb053033aa4260c2178a Signed-off-by: Mike Corrigan --- diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c index 87309818d254..163993bfa816 100644 --- a/arch/arm/mach-tegra/dma.c +++ b/arch/arm/mach-tegra/dma.c @@ -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];