Re: [Intel-gfx] [PATCH 13/52] drm/mcde: Use drmm_add_final_kfree

2020-02-19 Thread Linus Walleij
On Wed, Feb 19, 2020 at 11:21 AM Daniel Vetter  wrote:

> With this we can drop the final kfree from the release function.
>
> Signed-off-by: Daniel Vetter 
> Cc: Linus Walleij 

Reviewed-by: Linus Walleij 

Yours,
Linus Walleij
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 13/52] drm/mcde: Use drmm_add_final_kfree

2020-02-19 Thread Daniel Vetter
With this we can drop the final kfree from the release function.

Signed-off-by: Daniel Vetter 
Cc: Linus Walleij 
---
 drivers/gpu/drm/mcde/mcde_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
index f28cb7a576ba..7474481503a1 100644
--- a/drivers/gpu/drm/mcde/mcde_drv.c
+++ b/drivers/gpu/drm/mcde/mcde_drv.c
@@ -72,6 +72,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -223,7 +224,6 @@ static void mcde_release(struct drm_device *drm)
 
drm_mode_config_cleanup(drm);
drm_dev_fini(drm);
-   kfree(mcde);
 }
 
 DEFINE_DRM_GEM_CMA_FOPS(drm_fops);
@@ -330,6 +330,7 @@ static int mcde_probe(struct platform_device *pdev)
}
drm = >drm;
drm->dev_private = mcde;
+   drmm_add_final_kfree(drm, mcde);
platform_set_drvdata(pdev, drm);
 
/* Enable continuous updates: this is what Linux' framebuffer expects */
-- 
2.24.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx