From patchwork Tue Oct 10 18:31:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 13415860 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0765ACD8CAE for ; Tue, 10 Oct 2023 18:34:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6101410E3B4; Tue, 10 Oct 2023 18:34:41 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2680710E3B4 for ; Tue, 10 Oct 2023 18:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696962878; x=1728498878; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7AY2oWYGTXCloTbKzksQmq6qYtM5IlVLI/teR5ovFG4=; b=ln7latQoD1lK6w5RuydukEWuWEDOeC6AADRTs8Lhor4LsSPvnxOdkR2E sGUAkoO37kKS7n2STKurF2iEU2suFiu2Hsg+zYZrVq7cnPBLxqSpwslEL 8AE8suk9h6BXN2soJWlZTetXRdawbUuMFQgpTJNGsEZ0RkbUo9eoTEFoF /QQxGu+dm0AFNbuc/68zruVV0GrAj96SOR+xXJDSejkjPzEYW7t1xLwtw T22OExRoYUsCpjXUpKXEfz+ilIdaYc5vyfcHV0pAnE+Y/Ef9Z50uEKVVC /+DvTzGDUrlfA+t1gZ5sMdS7t3rhBezlajx25IMQ05pyC6gNZZLscwUIu g==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="384335777" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="384335777" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 11:32:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="819359639" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="819359639" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.32]) by fmsmga008.fm.intel.com with ESMTP; 10 Oct 2023 11:32:58 -0700 From: Suraj Kandpal To: intel-gfx@lists.freedesktop.org Date: Wed, 11 Oct 2023 00:01:01 +0530 Message-Id: <20231010183101.704439-3-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231010183101.704439-1-suraj.kandpal@intel.com> References: <20231010183101.704439-1-suraj.kandpal@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/2] drm/i915/display: Use correct method to free crtc_state X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Even though there is no leaking of resource here lets just use the correct method to free crtc_state Fixes: 8a3b3df39757 ("drm/i915: Clean up variable names in old dpll functions") Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_dpll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dpll.c b/drivers/gpu/drm/i915/display/intel_dpll.c index 2255ad651486..d41c1dc9f66c 100644 --- a/drivers/gpu/drm/i915/display/intel_dpll.c +++ b/drivers/gpu/drm/i915/display/intel_dpll.c @@ -7,6 +7,7 @@ #include #include "i915_reg.h" +#include "intel_atomic.h" #include "intel_crtc.h" #include "intel_cx0_phy.h" #include "intel_de.h" @@ -2006,7 +2007,7 @@ int vlv_force_pll_on(struct drm_i915_private *dev_priv, enum pipe pipe, vlv_enable_pll(crtc_state); } - kfree(crtc_state); + intel_crtc_destroy_state(&crtc->base, &crtc_state->uapi); return 0; }