dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbcon: Destroy mutex on freeing struct fb_info
@ 2022-08-21 11:17 Shigeru Yoshida
  2022-08-22 20:09 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Shigeru Yoshida @ 2022-08-21 11:17 UTC (permalink / raw)
  To: deller; +Cc: linux-fbdev, Shigeru Yoshida, linux-kernel, dri-devel

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>
---
 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 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);
 }
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fbcon: Destroy mutex on freeing struct fb_info
  2022-08-21 11:17 [PATCH] fbcon: Destroy mutex on freeing struct fb_info Shigeru Yoshida
@ 2022-08-22 20:09 ` Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2022-08-22 20:09 UTC (permalink / raw)
  To: Shigeru Yoshida; +Cc: linux-fbdev, linux-kernel, dri-devel

On 8/21/22 13:17, Shigeru Yoshida wrote:
> 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>

applied.
Thanks,
Helge

> ---
>  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 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);
>  }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-22 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-21 11:17 [PATCH] fbcon: Destroy mutex on freeing struct fb_info Shigeru Yoshida
2022-08-22 20:09 ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).