summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-07-01 19:39:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-18 07:45:45 -0700
commit4fbde5f0aabcd189d03e4e34a52024e70bdd3a73 (patch)
treec53208eb54211b82802524caabe1318dc698220a
parent27c35c76cdfec3848ef0997605cfc16cb85a290c (diff)
downloadlinux-3.10-4fbde5f0aabcd189d03e4e34a52024e70bdd3a73.tar.gz
linux-3.10-4fbde5f0aabcd189d03e4e34a52024e70bdd3a73.tar.bz2
linux-3.10-4fbde5f0aabcd189d03e4e34a52024e70bdd3a73.zip
drm/radeon: forever loop on error in radeon_do_test_moves()
commit 89cd67b326fa95872cc2b4524cd807128db6071d upstream. The error path does this: for (--i; i >= 0; --i) { which is a forever loop because "i" is unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/radeon/radeon_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
index bbed4af8d0b..f9ebf2bf8b5 100644
--- a/drivers/gpu/drm/radeon/radeon_test.c
+++ b/drivers/gpu/drm/radeon/radeon_test.c
@@ -37,8 +37,8 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag)
struct radeon_bo **gtt_obj = NULL;
struct radeon_fence *fence = NULL;
uint64_t gtt_addr, vram_addr;
- unsigned i, n, size;
- int r, ring;
+ unsigned n, size;
+ int i, r, ring;
switch (flag) {
case RADEON_TEST_COPY_DMA: