Skip to content

Commit

Permalink
drm/vc4: plane: Use return variable in atomic_check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard authored and Dave Stevenson committed Sep 9, 2024
1 parent f18029b commit 5171d86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/vc4/vc4_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5171d86

Please sign in to comment.