]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/sun4i: hdmi: Remove duplicate cleanup calls
authorStefan Mavrodiev <stefan@olimex.com>
Tue, 17 Dec 2019 12:46:32 +0000 (14:46 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:47:27 +0000 (23:47 -0500)
BugLink: https://bugs.launchpad.net/bugs/1860602
commit 57177d214ee0816c4436c23d6c933ccb32c571f1 upstream.

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: 9c5681011a0c ("drm/sun4i: Add HDMI support")
Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20191217124632.20820-1-stefan@olimex.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c

index b74f544d88793d13716b150a760a3126b9b63ef0..6f43c9a06915c2249e98e8ba1d43279a9933be97 100644 (file)
@@ -649,8 +649,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);
        clk_disable_unprepare(hdmi->mod_clk);
        clk_disable_unprepare(hdmi->bus_clk);