diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-09-18 15:44:18 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-19 07:14:05 -0400 |
commit | 2cc0bab8616a3d0ae1bae11f5cf16a582424aa91 (patch) | |
tree | 802989f473cdaa13a15b6428e0ff54519b332737 /arch/arm/plat-stmp3xxx | |
parent | ba978365031dbe84ee8ba2d7977cb667f40caf04 (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/arm/plat-stmp3xxx')
-rw-r--r-- | arch/arm/plat-stmp3xxx/dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-stmp3xxx/dma.c b/arch/arm/plat-stmp3xxx/dma.c index d2f497764dce..ef88f25fb870 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, | |||
264 | stmp3xxx_dma_free_command(ch, | 264 | stmp3xxx_dma_free_command(ch, |
265 | &descriptors | 265 | &descriptors |
266 | [i]); | 266 | [i]); |
267 | } while (i-- >= 0); | 267 | } while (i-- > 0); |
268 | } | 268 | } |
269 | return err; | 269 | return err; |
270 | } | 270 | } |