drm/radeon: drm/radeon: add missing radeon_semaphore_free to error path

It would appear this bug has been copy/pasted many times without being noticed.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Maarten Lankhorst 2014-04-24 13:29:14 +02:00 committed by Christian König
parent e9d14aeb30
commit aa4c8b36e5
7 changed files with 7 additions and 0 deletions

View File

@ -3702,6 +3702,7 @@ int cik_copy_cpdma(struct radeon_device *rdev,
r = radeon_fence_emit(rdev, fence, ring->idx); r = radeon_fence_emit(rdev, fence, ring->idx);
if (r) { if (r) {
radeon_ring_unlock_undo(rdev, ring); radeon_ring_unlock_undo(rdev, ring);
radeon_semaphore_free(rdev, &sem, NULL);
return r; return r;
} }

View File

@ -562,6 +562,7 @@ int cik_copy_dma(struct radeon_device *rdev,
r = radeon_fence_emit(rdev, fence, ring->idx); r = radeon_fence_emit(rdev, fence, ring->idx);
if (r) { if (r) {
radeon_ring_unlock_undo(rdev, ring); radeon_ring_unlock_undo(rdev, ring);
radeon_semaphore_free(rdev, &sem, NULL);
return r; return r;
} }

View File

@ -151,6 +151,7 @@ int evergreen_copy_dma(struct radeon_device *rdev,
r = radeon_fence_emit(rdev, fence, ring->idx); r = radeon_fence_emit(rdev, fence, ring->idx);
if (r) { if (r) {
radeon_ring_unlock_undo(rdev, ring); radeon_ring_unlock_undo(rdev, ring);
radeon_semaphore_free(rdev, &sem, NULL);
return r; return r;
} }

View File

@ -2839,6 +2839,7 @@ int r600_copy_cpdma(struct radeon_device *rdev,
r = radeon_fence_emit(rdev, fence, ring->idx); r = radeon_fence_emit(rdev, fence, ring->idx);
if (r) { if (r) {
radeon_ring_unlock_undo(rdev, ring); radeon_ring_unlock_undo(rdev, ring);
radeon_semaphore_free(rdev, &sem, NULL);
return r; return r;
} }

View File

@ -489,6 +489,7 @@ int r600_copy_dma(struct radeon_device *rdev,
r = radeon_fence_emit(rdev, fence, ring->idx); r = radeon_fence_emit(rdev, fence, ring->idx);
if (r) { if (r) {
radeon_ring_unlock_undo(rdev, ring); radeon_ring_unlock_undo(rdev, ring);
radeon_semaphore_free(rdev, &sem, NULL);
return r; return r;
} }

View File

@ -86,6 +86,7 @@ int rv770_copy_dma(struct radeon_device *rdev,
r = radeon_fence_emit(rdev, fence, ring->idx); r = radeon_fence_emit(rdev, fence, ring->idx);
if (r) { if (r) {
radeon_ring_unlock_undo(rdev, ring); radeon_ring_unlock_undo(rdev, ring);
radeon_semaphore_free(rdev, &sem, NULL);
return r; return r;
} }

View File

@ -213,6 +213,7 @@ int si_copy_dma(struct radeon_device *rdev,
r = radeon_fence_emit(rdev, fence, ring->idx); r = radeon_fence_emit(rdev, fence, ring->idx);
if (r) { if (r) {
radeon_ring_unlock_undo(rdev, ring); radeon_ring_unlock_undo(rdev, ring);
radeon_semaphore_free(rdev, &sem, NULL);
return r; return r;
} }