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 <treding@nvidia.com>
diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index 022462d3..6a5c7b8 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -347,5 +347,8 @@
 	if (gpio_is_valid(output->hpd_gpio))
 		disable_irq(output->hpd_irq);
 
+	if (output->panel)
+		drm_panel_detach(output->panel);
+
 	return 0;
 }