diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/r600_cs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 6858a4068f7..69ec24ab8d6 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
| @@ -2563,16 +2563,16 @@ int r600_dma_cs_next_reloc(struct radeon_cs_parser *p, | |||
| 2563 | struct radeon_cs_chunk *relocs_chunk; | 2563 | struct radeon_cs_chunk *relocs_chunk; |
| 2564 | unsigned idx; | 2564 | unsigned idx; |
| 2565 | 2565 | ||
| 2566 | *cs_reloc = NULL; | ||
| 2566 | if (p->chunk_relocs_idx == -1) { | 2567 | if (p->chunk_relocs_idx == -1) { |
| 2567 | DRM_ERROR("No relocation chunk !\n"); | 2568 | DRM_ERROR("No relocation chunk !\n"); |
| 2568 | return -EINVAL; | 2569 | return -EINVAL; |
| 2569 | } | 2570 | } |
| 2570 | *cs_reloc = NULL; | ||
| 2571 | relocs_chunk = &p->chunks[p->chunk_relocs_idx]; | 2571 | relocs_chunk = &p->chunks[p->chunk_relocs_idx]; |
| 2572 | idx = p->dma_reloc_idx; | 2572 | idx = p->dma_reloc_idx; |
| 2573 | if (idx >= relocs_chunk->length_dw) { | 2573 | if (idx >= p->nrelocs) { |
| 2574 | DRM_ERROR("Relocs at %d after relocations chunk end %d !\n", | 2574 | DRM_ERROR("Relocs at %d after relocations chunk end %d !\n", |
| 2575 | idx, relocs_chunk->length_dw); | 2575 | idx, p->nrelocs); |
| 2576 | return -EINVAL; | 2576 | return -EINVAL; |
| 2577 | } | 2577 | } |
| 2578 | *cs_reloc = p->relocs_ptr[idx]; | 2578 | *cs_reloc = p->relocs_ptr[idx]; |
