From patchwork Wed Aug 6 01:22:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 4682831 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 48D63C0338 for ; Wed, 6 Aug 2014 01:23:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 999EB201E4 for ; Wed, 6 Aug 2014 01:23:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CC1C2201DD for ; Wed, 6 Aug 2014 01:23:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C58B46E56A; Tue, 5 Aug 2014 18:23:48 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTP id B76CE6E56A for ; Tue, 5 Aug 2014 18:23:47 -0700 (PDT) Received: by mail-wi0-f169.google.com with SMTP id n3so8699089wiv.4 for ; Tue, 05 Aug 2014 18:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ALL5sBzg7FZGa2AZP+EFVjemax18BfiUi4TU/CI2k6A=; b=a3TMA9vDQ3199m5P86Xs9k3xU5/o6TJHywZYrqvhOrMGt3SaMOj5XWke1zf9TICSth ecdXCvy9/4BNyBMqEWK3MvekZ1Ww4h0HaTMg2jtPqbPpbFCVOQF6Qakbqj2DuxbDzUvE ixXAk1005nWGN0BhMTGfjHOzl/zeMVvIrICpeqf3K9ZXbUL1d/8aiJwN3eFB4Q02fd+l ZxhfcY/P5lZliLW2ppdRliVvszlNyUoKKScd2sfoPDHc+nHbD6DZ1a9jGRI98EvrbLgN QWxzYzpXO1TkW8ike338/IOjF7HBe78D+4e9b94tr7ABC3k5tI5i6m2LZBKl2C/ExFpR nV+w== X-Received: by 10.194.206.67 with SMTP id lm3mr11245270wjc.70.1407288226885; Tue, 05 Aug 2014 18:23:46 -0700 (PDT) Received: from twisty.fritz.box (stgt-4d02fac6.pool.mediaWays.net. [77.2.250.198]) by mx.google.com with ESMTPSA id wi9sm7913539wjc.23.2014.08.05.18.23.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Aug 2014 18:23:46 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] drm: Remove drm_vblank_cleanup from drm_vblank_init error path. Date: Wed, 6 Aug 2014 03:22:44 +0200 Message-Id: <1407288166-19881-2-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407288166-19881-1-git-send-email-mario.kleiner.de@gmail.com> References: <1407288166-19881-1-git-send-email-mario.kleiner.de@gmail.com> Cc: airlied@redhat.com, stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drm_vblank_cleanup() would operate on non-existent dev->vblank data structure, as failure to allocate that data structure is what triggers the error path in the first place. Signed-off-by: Mario Kleiner Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 0de123a..553a58c 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -224,7 +224,7 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs) return 0; err: - drm_vblank_cleanup(dev); + dev->num_crtcs = 0; return ret; } EXPORT_SYMBOL(drm_vblank_init);