summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-04-29 05:49:45 +0000
committerMaxime Ripard <maxime@cerno.tech>2022-04-29 16:26:56 +0200
commitf2a28a83f6c42f716f44b33e8a8acb718187b09f (patch)
treeed6f4687cc15fb500924ae190da99f5230e64e29 /drivers/gpu/drm
parent37f67d390d160f4bf6bde76e5113acfc004ee96a (diff)
drm/vc4: simplify the return expression of vc4_prepare_fb()
Simplify the return expression. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220429054945.3852039-1-chi.minghao@zte.com.cn
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/vc4/vc4_plane.c7
1 files changed, 1 insertions, 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,