diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-04-29 12:02:08 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-04-29 17:27:35 +0300 |
commit | a425e9802d029838660edd898667f8da6c64b030 (patch) | |
tree | 5a2dc2aa8b7c5fc679923e12f2bf50329afd7152 | |
parent | f2a28a83f6c42f716f44b33e8a8acb718187b09f (diff) | |
download | linux-a425e9802d029838660edd898667f8da6c64b030.tar.xz |
drm/vc4: simplify the return expression of vc4_grab_bin_bo()
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/20220429090208.3852879-1-chi.minghao@zte.com.cn
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_bo.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index e451cc5bcfac..49c0f2ac868b 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -738,19 +738,13 @@ static const struct drm_gem_object_funcs vc4_gem_object_funcs = { static int vc4_grab_bin_bo(struct vc4_dev *vc4, struct vc4_file *vc4file) { - int ret; - if (!vc4->v3d) return -ENODEV; if (vc4file->bin_bo_used) return 0; - ret = vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used); - if (ret) - return ret; - - return 0; + return vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used); } int vc4_create_bo_ioctl(struct drm_device *dev, void *data, |