From: Thierry Reding Date: Tue, 4 Nov 2014 15:20:20 +0000 (+0100) Subject: drm/tegra: Detach panel when a connector is removed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9aaa0cebcb3ebabd52a2a269a50fe3525d8deed1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/tegra: Detach panel when a connector is removed When the DRM device is torn down and the connector is removed, make sure to detach the panel to make sure there are no dangling pointers. Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c index 022462d3a413..6a5c7b81fbc5 100644 --- a/drivers/gpu/drm/tegra/output.c +++ b/drivers/gpu/drm/tegra/output.c @@ -347,5 +347,8 @@ int tegra_output_exit(struct tegra_output *output) if (gpio_is_valid(output->hpd_gpio)) disable_irq(output->hpd_irq); + if (output->panel) + drm_panel_detach(output->panel); + return 0; }