summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-03-12 15:04:06 +0100
committerArnd Bergmann <arnd@arndb.de>2013-03-12 15:04:06 +0100
commit7b59496c11747cd715995874177dafd50c8a0115 (patch)
tree58ba1c05306182a50606f63cbfbafb0faa90d7f4
parent27f423fe120df3a7488dd750b4e0508f03c325b6 (diff)
parent069552777a121eb39da29de4bc0383483dbe1f7e (diff)
Merge tag 'davinci-for-v3.9-rc/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes
Via Sekhar Nori <nsekhar@ti.com>: This patch fixes a boot breakage on DA830 that was introduced with EDMA DMA engine conversion. The bug has been there since v3.7 and has been marked for stable update. * tag 'davinci-for-v3.9-rc/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: edma: fix dmaengine induced null pointer dereference on da830 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/mach-davinci/dma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index a685e9706b7..45b7c71d9cc 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -743,6 +743,9 @@ EXPORT_SYMBOL(edma_free_channel);
*/
int edma_alloc_slot(unsigned ctlr, int slot)
{
+ if (!edma_cc[ctlr])
+ return -EINVAL;
+
if (slot >= 0)
slot = EDMA_CHAN_SLOT(slot);