summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-07-01 19:39:34 +0300
committerAlex Deucher <alexander.deucher@amd.com>2013-10-09 17:13:47 -0400
commit89cd67b326fa95872cc2b4524cd807128db6071d (patch)
tree4a2b653055cefed438c964d5d9c66b471bb9f8c8
parent50b8f5aec04ebec7dbdf2adb17220b9148c99e63 (diff)
downloadop-kernel-dev-89cd67b326fa95872cc2b4524cd807128db6071d.zip
op-kernel-dev-89cd67b326fa95872cc2b4524cd807128db6071d.tar.gz
drm/radeon: forever loop on error in radeon_do_test_moves()
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> Cc: stable@vger.kernel.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 f4d6bce..12e8099 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:
OpenPOWER on IntegriCloud