summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-09-18 12:44:18 -0700
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-19 12:14:05 +0100
commit2cc0bab8616a3d0ae1bae11f5cf16a582424aa91 (patch)
tree802989f473cdaa13a15b6428e0ff54519b332737 /arch
parentba978365031dbe84ee8ba2d7977cb667f40caf04 (diff)
ARM: STMP3xxx: deallocation with negative index of descriptors[]
The last deallocation is invalid. In the last iteration, i is -1. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: dmitry pervushin <dpervushin@embeddedalley.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-stmp3xxx/dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-stmp3xxx/dma.c b/arch/arm/plat-stmp3xxx/dma.c
index d2f497764dc..ef88f25fb87 100644
--- a/arch/arm/plat-stmp3xxx/dma.c
+++ b/arch/arm/plat-stmp3xxx/dma.c
@@ -264,7 +264,7 @@ int stmp3xxx_dma_make_chain(int ch, struct stmp37xx_circ_dma_chain *chain,
stmp3xxx_dma_free_command(ch,
&descriptors
[i]);
- } while (i-- >= 0);
+ } while (i-- > 0);
}
return err;
}