From patchwork Tue Apr 26 09:21:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Auld X-Patchwork-Id: 8936991 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E1B73BF29F for ; Tue, 26 Apr 2016 09:21:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18C732014A for ; Tue, 26 Apr 2016 09:21:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 23D3A20123 for ; Tue, 26 Apr 2016 09:21:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A96D289247; Tue, 26 Apr 2016 09:21:43 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 466536E78E for ; Tue, 26 Apr 2016 09:21:41 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 26 Apr 2016 02:21:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,536,1455004800"; d="scan'208";a="962861224" Received: from unknown (HELO localhost.isw.intel.com) ([10.237.224.82]) by orsmga002.jf.intel.com with ESMTP; 26 Apr 2016 02:21:40 -0700 From: Matthew Auld To: intel-gfx@lists.freedesktop.org Date: Tue, 26 Apr 2016 10:21:12 +0100 Message-Id: <1461662472-2608-1-git-send-email-matthew.auld@intel.com> X-Mailer: git-send-email 2.4.11 Subject: [Intel-gfx] [PATCH] drm/i915: In render_state_init reset obj in teardown path X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 The teardown path in render_state_init leaves so->obj != NULL. Suggested-by: Joonas Lahtinen Signed-off-by: Matthew Auld Reviewed-by: Dave Gordon --- drivers/gpu/drm/i915/i915_gem_render_state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/i915_gem_render_state.c b/drivers/gpu/drm/i915/i915_gem_render_state.c index 71611bf..10f3cf0 100644 --- a/drivers/gpu/drm/i915/i915_gem_render_state.c +++ b/drivers/gpu/drm/i915/i915_gem_render_state.c @@ -70,6 +70,7 @@ static int render_state_init(struct render_state *so, struct drm_device *dev) free_gem: drm_gem_object_unreference(&so->obj->base); + so->obj = NULL; return ret; }