Unverified Commit 57177d21 authored by Stefan Mavrodiev's avatar Stefan Mavrodiev Committed by Maxime Ripard
Browse files

drm/sun4i: hdmi: Remove duplicate cleanup calls



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.

Cc: <stable@vger.kernel.org>
Fixes: 9c568101 ("drm/sun4i: Add HDMI support")
Signed-off-by: default avatarStefan Mavrodiev <stefan@olimex.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20191217124632.20820-1-stefan@olimex.com
parent d16f0f61
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);