From: Russell King - ARM Linux Date: Mon, 3 Jan 2011 22:30:44 +0000 (+0000) Subject: ARM: PL08x: fix array overflow in dma_set_runtime_config() X-Git-Tag: v2.6.38-rc1~25^2~11^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4440aacf3a171a0ab498feda58d100a320c5d9ff;p=pandora-kernel.git ARM: PL08x: fix array overflow in dma_set_runtime_config() If maxburst was passed in as zero, we would overflow the burst_sizes[] array. Fix this by checking for this condition, and defaulting to single transfer 'bursts'. Improve the readability of the loop using a for() loop rather than a while() loop with the iterator initialized far from the loop. Signed-off-by: Russell King Acked-by: Linus Walleij Signed-off-by: Dan Williams --- Reading git-diff-tree failed