linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/sun4i: hdmi: Remove duplicate cleanup calls
@ 2019-12-17 12:46 Stefan Mavrodiev
  2019-12-18 22:18 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Mavrodiev @ 2019-12-17 12:46 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, David Airlie, Daniel Vetter,
	open list:DRM DRIVERS FOR ALLWINNER A10,
	moderated list:ARM/Allwinner sunXi SoC support, open list
  Cc: linux-sunxi, Stefan Mavrodiev

When the HDMI unbinds drm_connector_cleanup() and drm_encoder_cleanup()
are called. This also happens when the connector and the encoder are
destroyed. This double call triggers a NULL pointer exception.

The patch fixes this by removing the cleanup calls in the unbind
function.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
index a7c4654445c7..68d4644ac2dc 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
@@ -685,8 +685,6 @@ static void sun4i_hdmi_unbind(struct device *dev, struct device *master,
 	struct sun4i_hdmi *hdmi = dev_get_drvdata(dev);
 
 	cec_unregister_adapter(hdmi->cec_adap);
-	drm_connector_cleanup(&hdmi->connector);
-	drm_encoder_cleanup(&hdmi->encoder);
 	i2c_del_adapter(hdmi->i2c);
 	i2c_put_adapter(hdmi->ddc_i2c);
 	clk_disable_unprepare(hdmi->mod_clk);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] drm/sun4i: hdmi: Remove duplicate cleanup calls
  2019-12-17 12:46 [PATCH 1/1] drm/sun4i: hdmi: Remove duplicate cleanup calls Stefan Mavrodiev
@ 2019-12-18 22:18 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2019-12-18 22:18 UTC (permalink / raw)
  To: Stefan Mavrodiev
  Cc: Chen-Yu Tsai, David Airlie, Daniel Vetter,
	open list:DRM DRIVERS FOR ALLWINNER A10,
	moderated list:ARM/Allwinner sunXi SoC support, open list,
	linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

On Tue, Dec 17, 2019 at 02:46:32PM +0200, Stefan Mavrodiev wrote:
> When the HDMI unbinds drm_connector_cleanup() and drm_encoder_cleanup()
> are called. This also happens when the connector and the encoder are
> destroyed. This double call triggers a NULL pointer exception.
>
> The patch fixes this by removing the cleanup calls in the unbind
> function.
>
> Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>

Added a fixes tag, and cc'd stable, and applied, thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-18 22:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 12:46 [PATCH 1/1] drm/sun4i: hdmi: Remove duplicate cleanup calls Stefan Mavrodiev
2019-12-18 22:18 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).