Skip to content

Commit

Permalink
drm/radeon: forever loop on error in radeon_do_test_moves()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dan Carpenter authored and Alex Deucher committed Oct 9, 2013
1 parent 50b8f5a commit 89cd67b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/radeon/radeon_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 89cd67b

Please sign in to comment.