STMP3xxx: deallocation with negative index of descriptors[]
Subsystems (3)
PATCH 2/3 STMP3xxx: deallocation with negative index of descriptors[]
From: Roel Kluin <[email protected]>
The last deallocation is invalid. In the last iteration, i is -1.
Signed-off-by Roel Kluin <[email protected]>
Acked-by dmitry pervushin <[email protected]>
Cc Russell King <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/arm/plat-stmp3xxx/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/plat-stmp3xxx/dma.c renamed from arch/arm/plat-stmp3xxx/dma.c~stmp3xxx-deallocation-with-negative-index-of-descriptors +1 -1
@@ -264,7 +264,7 @@ int stmp3xxx_dma_make_chain(int ch, strustmp3xxx_dma_free_command (ch, &descriptors [i]); - }while (i-- >=0 ); + }while (i-- >0 ); }return err; }
_