drm/nouveau: add missing single_release()
Subsystems (4)
PATCH 1/1 drm/nouveau: add missing single_release()
When using single_open() for opening, single_release() should be used, otherwise there is a memory leak.
This is detected by Coccinelle semantic patch.
Fixes 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs")
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_debugfs.c +1 -0
@@ -202,6 +202,7 @@ static const struct file_operations nouveau_pstate_fops = { .open = nouveau_debugfs_pstate_open, .read = seq_read, .write = nouveau_debugfs_pstate_set, + .release = single_release, };static struct drm_info_list nouveau_debugfs_list[] = {
Reviewed-by Karol Herbst <[email protected]>
Quoted 27 lines · Wei Yongjun
When using
single_open()for opening,single_release()should be used, otherwise there is a memory leak.This is detected by Coccinelle semantic patch.
Fixes 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs")Signed-off-by Wei Yongjun <[email protected]>--- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/nouveau/nouveau_debugfs.c +1
-0@@ -202,6 +202,7 @@ static const struct file_operations nouveau_pstate_fops = { .open = nouveau_debugfs_pstate_open, .read = seq_read, .write = nouveau_debugfs_pstate_set, + .release = single_release, };static struct drm_info_list nouveau_debugfs_list[] = {
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau