]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/vc4: plane: Use return variable in atomic_check
authorMaxime Ripard <mripard@kernel.org>
Fri, 21 Jun 2024 15:20:36 +0000 (16:20 +0100)
committerDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 9 Sep 2024 12:02:53 +0000 (13:02 +0100)
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@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-13-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_plane.c

index 16197c4b4b33eee298fdce669d2aa5e7b2bee2ef..d078a2d21eeae04a1109dd1a8d6d44ae17326f4c 100644 (file)
@@ -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,