lkml.org 
[lkml]   [2022]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.15 21/23] fbdev: fbcon: Destroy mutex on freeing struct fb_info
    Date
    From: Shigeru Yoshida <syoshida@redhat.com>

    [ Upstream commit 58559dfc1ebba2ae0c7627dc8f8991ae1984c6e3 ]

    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>
    ---
    drivers/video/fbdev/core/fbsysfs.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c
    index ce699396d6bad..09ee27e7fc25f 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);
    }
    --
    2.35.1
    \
     
     \ /
      Last update: 2022-08-30 19:28    [W:9.532 / U:0.204 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site