Commit 81e32646 authored by Daniel Vetter's avatar Daniel Vetter

drm/ingenic: Use drmm_add_final_kfree

With this we can drop the final kfree from the release function.
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarPaul Cercueil <paul@crapouillou.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Paul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-17-daniel.vetter@ffwll.ch
parent 144a29fd
......@@ -23,6 +23,7 @@
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_irq.h>
#include <drm/drm_managed.h>
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_plane.h>
......@@ -490,11 +491,8 @@ static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg)
static void ingenic_drm_release(struct drm_device *drm)
{
struct ingenic_drm *priv = drm_device_get_priv(drm);
drm_mode_config_cleanup(drm);
drm_dev_fini(drm);
kfree(priv);
}
static int ingenic_drm_enable_vblank(struct drm_crtc *crtc)
......@@ -639,6 +637,7 @@ static int ingenic_drm_probe(struct platform_device *pdev)
kfree(priv);
return ret;
}
drmm_add_final_kfree(drm, priv);
drm_mode_config_init(drm);
drm->mode_config.min_width = 0;
......
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