From: Shigeru Yoshida Date: Sun, 21 Aug 2022 11:17:31 +0000 (+0900) Subject: fbdev: fbcon: Destroy mutex on freeing struct fb_info X-Git-Tag: v6.1-rc5~527^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58559dfc1ebba2ae0c7627dc8f8991ae1984c6e3;p=platform%2Fkernel%2Flinux-starfive.git fbdev: fbcon: Destroy mutex on freeing struct fb_info It's needed to destroy bl_curve_mutex on freeing struct fb_info since the mutex is embedded in the structure and initialized when it's allocated. Signed-off-by: Shigeru Yoshida Signed-off-by: Helge Deller --- diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c index c2a60b187467..4d7f63892dcc 100644 --- a/drivers/video/fbdev/core/fbsysfs.c +++ b/drivers/video/fbdev/core/fbsysfs.c @@ -84,6 +84,10 @@ void framebuffer_release(struct fb_info *info) if (WARN_ON(refcount_read(&info->count))) return; +#if IS_ENABLED(CONFIG_FB_BACKLIGHT) + mutex_destroy(&info->bl_curve_mutex); +#endif + kfree(info->apertures); kfree(info); }