[PATCH 13/31] drm/vc4: plane: Use return variable in atomic_check
Dave Stevenson
dave.stevenson at raspberrypi.com
Thu Jun 20 15:46:14 UTC 2024
From: Maxime Ripard <maxime at cerno.tech>
The vc4_plane_atomic_check() directly returns the result of the final
function it calls.
Using the already defined ret variable to check its content on error,
and a separate return 0 on success, makes it easier to extend.
Signed-off-by: Maxime Ripard <mripard at kernel.org>
Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
---
drivers/gpu/drm/vc4/vc4_plane.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 16197c4b4b33..d078a2d21eea 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -1386,7 +1386,11 @@ static int vc4_plane_atomic_check(struct drm_plane *plane,
if (ret)
return ret;
- return vc4_plane_allocate_lbm(new_plane_state);
+ ret = vc4_plane_allocate_lbm(new_plane_state);
+ if (ret)
+ return ret;
+
+ return 0;
}
static void vc4_plane_atomic_update(struct drm_plane *plane,
--
2.34.1
More information about the dri-devel
mailing list