Skip to content

Commit

Permalink
fbdev: fbcon: Destroy mutex on freeing struct fb_info
Browse files Browse the repository at this point in the history
[ Upstream commit 58559df ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Shigeru Yoshida authored and gregkh committed Sep 15, 2022
1 parent 4b688f8 commit 914b3d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/video/fbdev/core/fbsysfs.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 914b3d9

Please sign in to comment.