From mboxrd@z Thu Jan 1 00:00:00 1970 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 23404C43334 for ; Wed, 22 Jun 2022 14:33:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 684D311333A; Wed, 22 Jun 2022 14:33:38 +0000 (UTC) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5BC4C113358 for ; Wed, 22 Jun 2022 14:33:37 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 15995320095B; Wed, 22 Jun 2022 10:33:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 22 Jun 2022 10:33:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1655908415; x=1655994815; bh=BB s0uJewNrT0bWZEQZBt8oZUQDSEinjlcCS+QPJFnEg=; b=Ui2DASVODQbtRrC5xe AXyn3UPxfPpihK/aSS1FF4IJkUZVFHiM8nggX+Yz2U0y9yuMMJztnx+IEQGhD1f4 I6jGc+QV3cxHVy14kWEZhKKZsWwwU0p+rtwU0dx9vnaeQLAh7dDyvXj9NhMmUmmJ Fldquu4Z9CdJ0koweCZ/CH4ps71MQwevL4u43y9mFlaeTCfXlfYUCKyBhnMSOrbJ soubeAVhiY6prc+HQ2NQ7aak5l5z23UgNXSp3cecPsXdat90X9pGDwmfy1N4P+aS CCLkV3WEgDKNx7JM35xdWnMdRIUPVwdG8bIThhzR4UAHj/A+O//mKb7nGmjLagQ2 S1Jw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1655908415; x=1655994815; bh=BBs0uJewNrT0b WZEQZBt8oZUQDSEinjlcCS+QPJFnEg=; b=dlSIhWNt/zyyC7nMo1EtoiN491J6G GjwjMx7T1kGjm6tB02HlYUtbfGwxMDtgWfJAl+c5XxNPbwZpYU2vvyafWZ4MeOYl gECasazDhf388DH1Dya+QnL7wXGW/9nGAt4xvzSnf6Z5W9IvEOy6rwA93OQeYCb6 LyVho+N1NjI/DsB2/tl5J9pAdpeWfiB/5gznZbcyNgWagIICr3DihMaVslkXV++u vAJ+AWbdTgnD6Q0nhRQdE04H1gCw9U77gle9waxf6z5szpxG5mOTBj3bLq+m4os3 CwKV3f+EsRvsMTmxNTodpMxf/d8et6nTEECfdmLsgHmwf4p1iVN1tNAew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefhedgjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelkeefteduhfekjeeihfetudfguedvveekkeetteekhfekhfdtlefgfedu vdejhfenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jun 2022 10:33:34 -0400 (EDT) From: Maxime Ripard To: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Subject: [PATCH v2 26/68] drm/vc4: dpi: Remove unnecessary drm_of_panel_bridge_remove call Date: Wed, 22 Jun 2022 16:31:27 +0200 Message-Id: <20220622143209.600298-27-maxime@cerno.tech> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220622143209.600298-1-maxime@cerno.tech> References: <20220622143209.600298-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Dave Stevenson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since we have a managed call to create our panel_bridge instance, the call to drm_of_panel_bridge_remove() at unbind is both redundant and dangerous since it might lead to a use-after-free. Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dpi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index 658e0aa9e2e1..5a6cdea7bf7b 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -309,8 +309,6 @@ static void vc4_dpi_unbind(struct device *dev, struct device *master, { struct vc4_dpi *dpi = dev_get_drvdata(dev); - drm_of_panel_bridge_remove(dev->of_node, 0, 0); - drm_encoder_cleanup(&dpi->encoder.base); clk_disable_unprepare(dpi->core_clock); -- 2.36.1