Commit 29d674c4 authored by Guido Martínez's avatar Guido Martínez Committed by Greg Kroah-Hartman

drm/tilcdc: panel: fix leak when unloading the module

commit 3a490122 upstream.

The driver did not unregister the allocated framebuffer, which caused
memory leaks (and memory manager WARNs) when unloading. Also, the
framebuffer device under /dev still existed after unloading.

Add a call to drm_fbdev_cma_fini when unloading the module to prevent
both issues.
Signed-off-by: default avatarGuido Martínez <guido@vanguardiasur.com.ar>
Tested-by: default avatarDarren Etheridge <detheridge@ti.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c085fc88
...@@ -122,6 +122,7 @@ static int tilcdc_unload(struct drm_device *dev) ...@@ -122,6 +122,7 @@ static int tilcdc_unload(struct drm_device *dev)
struct tilcdc_drm_private *priv = dev->dev_private; struct tilcdc_drm_private *priv = dev->dev_private;
struct tilcdc_module *mod, *cur; struct tilcdc_module *mod, *cur;
drm_fbdev_cma_fini(priv->fbdev);
drm_kms_helper_poll_fini(dev); drm_kms_helper_poll_fini(dev);
drm_mode_config_cleanup(dev); drm_mode_config_cleanup(dev);
drm_vblank_cleanup(dev); drm_vblank_cleanup(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment