Skip to content

Commit

Permalink
ARM: STMP3xxx: deallocation with negative index of descriptors[]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Russell King committed Sep 19, 2009
1 parent ba97836 commit 2cc0bab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/plat-stmp3xxx/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2cc0bab

Please sign in to comment.