diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2011-07-13 11:18:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-07-14 02:15:16 -0400 |
commit | d0254d56c72532b5d818d83c5e247fc627803f08 (patch) | |
tree | 60f5bd1c16c1598933a3c7451ccc77b0ff1938c8 /drivers | |
parent | fcc485d6672952f0ec6d077ea92f703670075323 (diff) |
drm/radeon: Don't clobber error return value in page flipping cleanup paths.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_display.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index ffce85a91165..28f4655905bc 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c | |||
@@ -460,17 +460,12 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc, | |||
460 | return 0; | 460 | return 0; |
461 | 461 | ||
462 | pflip_cleanup1: | 462 | pflip_cleanup1: |
463 | r = radeon_bo_reserve(rbo, false); | 463 | if (unlikely(radeon_bo_reserve(rbo, false) != 0)) { |
464 | if (unlikely(r != 0)) { | ||
465 | DRM_ERROR("failed to reserve new rbo in error path\n"); | 464 | DRM_ERROR("failed to reserve new rbo in error path\n"); |
466 | goto pflip_cleanup; | 465 | goto pflip_cleanup; |
467 | } | 466 | } |
468 | r = radeon_bo_unpin(rbo); | 467 | if (unlikely(radeon_bo_unpin(rbo) != 0)) { |
469 | if (unlikely(r != 0)) { | ||
470 | radeon_bo_unreserve(rbo); | ||
471 | r = -EINVAL; | ||
472 | DRM_ERROR("failed to unpin new rbo in error path\n"); | 468 | DRM_ERROR("failed to unpin new rbo in error path\n"); |
473 | goto pflip_cleanup; | ||
474 | } | 469 | } |
475 | radeon_bo_unreserve(rbo); | 470 | radeon_bo_unreserve(rbo); |
476 | 471 | ||