From patchwork Tue Jul 12 11:39:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Michel_D=C3=A4nzer?= X-Patchwork-Id: 968212 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6CCV7sR006563 for ; Tue, 12 Jul 2011 12:31:28 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B31A79EFE4 for ; Tue, 12 Jul 2011 05:31:06 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 12 Jul 2011 12:31:28 +0000 (UTC) X-Greylist: delayed 903 seconds by postgrey-1.31 at gabe; Tue, 12 Jul 2011 05:30:48 PDT Received: from AM1EHSOBE001.bigfish.com (am1ehsobe001.messaging.microsoft.com [213.199.154.204]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E97B9F669 for ; Tue, 12 Jul 2011 05:30:48 -0700 (PDT) Received: from mail27-am1-R.bigfish.com (10.3.201.254) by AM1EHSOBE001.bigfish.com (10.3.204.21) with Microsoft SMTP Server id 14.1.225.22; Tue, 12 Jul 2011 12:15:43 +0000 Received: from mail27-am1 (localhost.localdomain [127.0.0.1]) by mail27-am1-R.bigfish.com (Postfix) with ESMTP id 50815AC036B for ; Tue, 12 Jul 2011 12:15:43 +0000 (UTC) X-SpamScore: 1 X-BigFish: VPS1(zzzz1202hzz8275bhz32i668h839h93fh61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:163.181.249.109; KIP:(null); UIP:(null); IPVD:NLI; H:ausb3twp02.amd.com; RD:none; EFVD:NLI Received: from mail27-am1 (localhost.localdomain [127.0.0.1]) by mail27-am1 (MessageSwitch) id 1310472942603408_3501; Tue, 12 Jul 2011 12:15:42 +0000 (UTC) Received: from AM1EHSMHS004.bigfish.com (unknown [10.3.201.254]) by mail27-am1.bigfish.com (Postfix) with ESMTP id 875D3117004E for ; Tue, 12 Jul 2011 12:15:42 +0000 (UTC) Received: from ausb3twp02.amd.com (163.181.249.109) by AM1EHSMHS004.bigfish.com (10.3.207.104) with Microsoft SMTP Server id 14.1.225.22; Tue, 12 Jul 2011 12:15:41 +0000 X-WSS-ID: 0LO7ZE2-02-KY5-02 X-M-MSG: Received: from sausexedgep02.amd.com (sausexedgep02-ext.amd.com [163.181.249.73]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Axway MailGate 3.8.1) with ESMTP id 2404AC81EF for ; Tue, 12 Jul 2011 07:15:37 -0500 (CDT) Received: from SAUSEXDAG01.amd.com (163.181.55.1) by sausexedgep02.amd.com (163.181.36.59) with Microsoft SMTP Server (TLS) id 8.3.106.1; Tue, 12 Jul 2011 07:16:34 -0500 Received: from storexhtp01.amd.com (172.24.4.3) by sausexdag01.amd.com (163.181.55.1) with Microsoft SMTP Server (TLS) id 14.1.289.1; Tue, 12 Jul 2011 07:15:39 -0500 Received: from probook.local (10.224.153.62) by storexhtp01.amd.com (172.24.4.3) with Microsoft SMTP Server id 8.3.83.0; Tue, 12 Jul 2011 08:15:37 -0400 Received: from daenzer by probook.local with local (Exim 4.76) (envelope-from ) id 1QgbJd-0005L6-Cr for dri-devel@lists.freedesktop.org; Tue, 12 Jul 2011 13:39:49 +0200 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= To: Subject: [PATCH 2/2] radeon: Don't clobber error return value in page flipping cleanup paths. Date: Tue, 12 Jul 2011 13:39:47 +0200 Message-ID: <1310470787-20490-2-git-send-email-michel@daenzer.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310470787-20490-1-git-send-email-michel@daenzer.net> References: <1310470787-20490-1-git-send-email-michel@daenzer.net> MIME-Version: 1.0 X-OriginatorOrg: amd.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-MIME-Autoconverted: from base64 to 8bit by demeter2.kernel.org id p6CCV7sR006563 From: Michel Dänzer Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher --- 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 71a4840..c2d8d25 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -458,17 +458,12 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc, return 0; pflip_cleanup1: - r = radeon_bo_reserve(rbo, false); - if (unlikely(r != 0)) { + if (unlikely(radeon_bo_reserve(rbo, false) != 0)) { DRM_ERROR("failed to reserve new rbo in error path\n"); goto pflip_cleanup; } - r = radeon_bo_unpin(rbo); - if (unlikely(r != 0)) { - radeon_bo_unreserve(rbo); - r = -EINVAL; + if (unlikely(radeon_bo_unpin(rbo) != 0)) { DRM_ERROR("failed to unpin new rbo in error path\n"); - goto pflip_cleanup; } radeon_bo_unreserve(rbo);