Commit a425e980 authored by Minghao Chi's avatar Minghao Chi Committed by Maxime Ripard

drm/vc4: simplify the return expression of vc4_grab_bin_bo()

Simplify the return expression.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220429090208.3852879-1-chi.minghao@zte.com.cn
parent f2a28a83
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment