[PATCH v4 09/37] drm/vkms: Simplify plane_release code

Louis Chauvet
2026-04-22T16:49:16Z

plane_release code used multiple intermediate variable, remove those in
favor of direct access.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
drivers/gpu/drm/vkms/vkms_configfs.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c b/drivers/gpu/drm/vkms/vkms_configfs.c
index 7551b8c7766d..97f87a53d202 100644
--- a/drivers/gpu/drm/vkms/vkms_configfs.c
+++ b/drivers/gpu/drm/vkms/vkms_configfs.c
@@ -333,13 +333,9 @@ static struct configfs_attribute *plane_item_attrs[] = {

static void plane_release(struct config_item *item)
{
- struct vkms_configfs_plane *plane;
- struct mutex *lock;
-
- plane = plane_item_to_vkms_configfs_plane(item);
- lock = &plane->dev->lock;
+ struct vkms_configfs_plane *plane = plane_item_to_vkms_configfs_plane(item);

- scoped_guard(mutex, lock) {
+ scoped_guard(mutex, &plane->dev->lock) {
vkms_config_destroy_plane(plane->config);
kfree(plane);
}

--
2.54.0