mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
[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 <michael.corrigan@motorola.com>
This commit is contained in:
committed by
Colin Cross
parent
1785cb19f0
commit
43ca7cdda2
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user