From patchwork Thu May 7 01:01:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kasireddy, Vivek" X-Patchwork-Id: 11532319 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6B2A1392 for ; Thu, 7 May 2020 01:07:10 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9DFF320747 for ; Thu, 7 May 2020 01:07:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DFF320747 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E5AB6E037; Thu, 7 May 2020 01:07:10 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id B49086E037 for ; Thu, 7 May 2020 01:07:08 +0000 (UTC) IronPort-SDR: 4JCu5zdWuST4pN/LE1ZrK6sW4H2xajmOpmgnnqU/wdKmOEsEcnm7KzTZyVcKefJ7D4YnjSqATy 184lpUIfQmuQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 18:07:08 -0700 IronPort-SDR: eOiUZjCbbVCU8SPJ86F/IrCXMcN2la+2T/1KQWDmqLwdBu83JdWr8gU3SwMSTEGnvg+rmHYaI1 RVQXAh7OmOrA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,361,1583222400"; d="scan'208";a="249120083" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga007.jf.intel.com with ESMTP; 06 May 2020 18:07:08 -0700 Received: from vkasired-desk2.fm.intel.com (10.22.254.140) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 May 2020 18:07:07 -0700 From: Vivek Kasireddy To: Date: Wed, 6 May 2020 18:01:03 -0700 Message-ID: <20200507010103.16040-1-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-Originating-IP: [10.22.254.140] Subject: [Intel-gfx] [PATCH] drm/i915/dsi: Dont forget to clean up the connector on error 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" During the DSI initialization setup, after instantiating the relevant drm connector and encoder objects, the connector also needs to be cleaned up along with the encoder if an error is encountered. The error can happen due to a missing mode in the VBT or for other reasons. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/i915/display/icl_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c index 4fec5bd64920..f93f72463df5 100644 --- a/drivers/gpu/drm/i915/display/icl_dsi.c +++ b/drivers/gpu/drm/i915/display/icl_dsi.c @@ -1954,6 +1954,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) return; err: + drm_connector_cleanup(connector); drm_encoder_cleanup(&encoder->base); kfree(intel_dsi); kfree(intel_connector);