kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] video: fbdev: Use framebuffer_release instead of kfree to free a frame buffer
@ 2020-12-10 14:48 Christophe JAILLET
  0 siblings, 0 replies; only message in thread
From: Christophe JAILLET @ 2020-12-10 14:48 UTC (permalink / raw)
  To: daniel.vetter, grandmaster
  Cc: Christophe JAILLET, linux-fbdev, kernel-janitors, linux-kernel,
	dri-devel

Use 'framebuffer_release()' instead of 'kfree()' to undo a
'framebuffer_alloc()' call, both in the error handling path of the probe
function and in remove function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/video/fbdev/ep93xx-fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/ep93xx-fb.c b/drivers/video/fbdev/ep93xx-fb.c
index ba33b4dce0df..80a70e5796b8 100644
--- a/drivers/video/fbdev/ep93xx-fb.c
+++ b/drivers/video/fbdev/ep93xx-fb.c
@@ -566,7 +566,7 @@ static int ep93xxfb_probe(struct platform_device *pdev)
 failed_videomem:
 	fb_dealloc_cmap(&info->cmap);
 failed_cmap:
-	kfree(info);
+	framebuffer_release(info);
 
 	return err;
 }
@@ -584,7 +584,7 @@ static int ep93xxfb_remove(struct platform_device *pdev)
 	if (fbi->mach_info->teardown)
 		fbi->mach_info->teardown(pdev);
 
-	kfree(info);
+	framebuffer_release(info);
 
 	return 0;
 }
-- 
2.27.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-10 14:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 14:48 [PATCH 1/2] video: fbdev: Use framebuffer_release instead of kfree to free a frame buffer Christophe JAILLET

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox