2022-04-29 07:44:56

by CGEL

[permalink] [raw]
Subject: [PATCH] drm/vc4: simplify the return expression of vc4_prepare_fb()

From: Minghao Chi <[email protected]>

Simplify the return expression.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
---
drivers/gpu/drm/vc4/vc4_plane.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 920a9eefe426..b3438f4a81ce 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -1350,7 +1350,6 @@ static int vc4_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *state)
{
struct vc4_bo *bo;
- int ret;

if (!state->fb)
return 0;
@@ -1362,11 +1361,7 @@ static int vc4_prepare_fb(struct drm_plane *plane,
if (plane->state->fb == state->fb)
return 0;

- ret = vc4_bo_inc_usecnt(bo);
- if (ret)
- return ret;
-
- return 0;
+ return vc4_bo_inc_usecnt(bo);
}

static void vc4_cleanup_fb(struct drm_plane *plane,
--
2.25.1



2022-05-01 17:10:34

by Maxime Ripard

[permalink] [raw]
Subject: Re: (subset) [PATCH] drm/vc4: simplify the return expression of vc4_prepare_fb()

On Fri, 29 Apr 2022 05:49:45 +0000, [email protected] wrote:
> From: Minghao Chi <[email protected]>
>
> Simplify the return expression.
>
>

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime