Commit d0254d56 authored by Michel Dänzer's avatar Michel Dänzer Committed by Dave Airlie

drm/radeon: Don't clobber error return value in page flipping cleanup paths.

Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent fcc485d6
...@@ -460,17 +460,12 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc, ...@@ -460,17 +460,12 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc,
return 0; return 0;
pflip_cleanup1: pflip_cleanup1:
r = radeon_bo_reserve(rbo, false); if (unlikely(radeon_bo_reserve(rbo, false) != 0)) {
if (unlikely(r != 0)) {
DRM_ERROR("failed to reserve new rbo in error path\n"); DRM_ERROR("failed to reserve new rbo in error path\n");
goto pflip_cleanup; goto pflip_cleanup;
} }
r = radeon_bo_unpin(rbo); if (unlikely(radeon_bo_unpin(rbo) != 0)) {
if (unlikely(r != 0)) {
radeon_bo_unreserve(rbo);
r = -EINVAL;
DRM_ERROR("failed to unpin new rbo in error path\n"); DRM_ERROR("failed to unpin new rbo in error path\n");
goto pflip_cleanup;
} }
radeon_bo_unreserve(rbo); radeon_bo_unreserve(rbo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment