summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorShigeru Yoshida <syoshida@redhat.com>2022-08-21 20:17:31 +0900
committerHelge Deller <deller@gmx.de>2022-08-24 21:47:08 +0200
commit58559dfc1ebba2ae0c7627dc8f8991ae1984c6e3 (patch)
tree6e317ee0df1c4809664587ae155dadbf6d366738 /drivers/video
parent1cd3bf3348b4a686cc955c9cd11034d7652219cd (diff)
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 <syoshida@redhat.com> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/core/fbsysfs.c4
1 files changed, 4 insertions, 0 deletions
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);
}