summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-01-25 11:18:32 +0100
committerDan Williams <dan.j.williams@intel.com>2011-01-30 22:27:21 -0800
commit6045f0bb2818393a44e835454db96709cb5b3d80 (patch)
treefc6c06e7d302100979b0e4a81913b878b83cb5d6 /drivers/dma
parente65889c75ccb5b64dfb60f32e2d9448446cabcc7 (diff)
downloadlinux-6045f0bb2818393a44e835454db96709cb5b3d80.tar.gz
linux-6045f0bb2818393a44e835454db96709cb5b3d80.tar.bz2
linux-6045f0bb2818393a44e835454db96709cb5b3d80.zip
dma40: handle failure to allocate first LCLA
Acked-by: Per Forlin <per.forlin@stericsson.com> Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ste_dma40.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 4ec96ac1e41a..b8cce85a9558 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -538,6 +538,10 @@ static void d40_log_lli_to_lcxa(struct d40_chan *chan, struct d40_desc *desc)
curr_lcla);
lli_current++;
+
+ if (curr_lcla < 0)
+ goto out;
+
for (; lli_current < lli_len; lli_current++) {
unsigned int lcla_offset = chan->phy_chan->num * 1024 +
8 * curr_lcla * 2;
@@ -567,6 +571,7 @@ static void d40_log_lli_to_lcxa(struct d40_chan *chan, struct d40_desc *desc)
}
}
+out:
desc->lli_current = lli_current;
}