History

Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Just two small fixes in the ttm_tt_populate error handling; one for radeon, one for amdgpu. * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: use post-decrement in error handling drm/amdgpu: use post-decrement in error handling

Dave Airlie committed 10 years ago

Commit aaa7dd22 parents 42412b1 bc3f5d82 files · +2 −2Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 −1
  2. drivers/gpu/drm/radeon/radeon_ttm.c +1 −1
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+1−1
@@ -712,7 +712,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm) · 711 unmodified lines
712712 0, PAGE_SIZE,
713713 PCI_DMA_BIDIRECTIONAL);
714714 if (pci_dma_mapping_error(adev->pdev, gtt->ttm.dma_address[i])) {
715− while (--i) {
715+ while (i--) {
716716 pci_unmap_page(adev->pdev, gtt->ttm.dma_address[i],
717717 PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
718718 gtt->ttm.dma_address[i] = 0;
drivers/gpu/drm/radeon/radeon_ttm.c+1−1
@@ -758,7 +758,7 @@ static int radeon_ttm_tt_populate(struct ttm_tt *ttm) · 757 unmodified lines
758758 0, PAGE_SIZE,
759759 PCI_DMA_BIDIRECTIONAL);
760760 if (pci_dma_mapping_error(rdev->pdev, gtt->ttm.dma_address[i])) {
761− while (--i) {
761+ while (i--) {
762762 pci_unmap_page(rdev->pdev, gtt->ttm.dma_address[i],
763763 PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
764764 gtt->ttm.dma_address[i] = 0;