diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-01 19:39:34 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-18 10:54:59 -0700 |
commit | 1999f171b41cd3bb07a42832d406da4854f9d306 (patch) | |
tree | 93a7b15be1079a166c3c918ed57b019a5bc6761a /drivers/gpu/drm/radeon/radeon_test.c | |
parent | 18696c0ee4e595627a8035def695ca338f03a1f9 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_test.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_test.c | 4 |
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 f4d6bcee900..12e8099a082 100644 --- a/drivers/gpu/drm/radeon/radeon_test.c +++ b/drivers/gpu/drm/radeon/radeon_test.c @@ -36,8 +36,8 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag) struct radeon_bo *vram_obj = NULL; struct radeon_bo **gtt_obj = 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: |