From: Maxime Ripard Date: Mon, 11 Jul 2022 17:38:57 +0000 (+0200) Subject: drm/vc4: dpi: Remove unnecessary drm_of_panel_bridge_remove call X-Git-Tag: v6.1-rc5~176^2~22^2~212 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5801eda938f5f98cbdb6bc83e2c35499735f006a;p=platform%2Fkernel%2Flinux-starfive.git drm/vc4: dpi: Remove unnecessary drm_of_panel_bridge_remove call 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. Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220711173939.1132294-28-maxime@cerno.tech --- diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index 7028a78..f18b05c 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -329,8 +329,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);