drm/virtio: simplify the return expression

Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: http://patchwork.freedesktop.org/patch/msgid/20220429054911.3851977-1-chi.minghao@zte.com.cn
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Minghao Chi 2022-04-29 05:49:11 +00:00 committed by Gerd Hoffmann
parent d9c1452c0f
commit 20f038d074
1 changed files with 1 additions and 5 deletions

View File

@ -90,7 +90,6 @@ static const struct virtio_dma_buf_ops virtgpu_dmabuf_ops = {
int virtio_gpu_resource_assign_uuid(struct virtio_gpu_device *vgdev,
struct virtio_gpu_object *bo)
{
int ret;
struct virtio_gpu_object_array *objs;
objs = virtio_gpu_array_alloc(1);
@ -98,11 +97,8 @@ int virtio_gpu_resource_assign_uuid(struct virtio_gpu_device *vgdev,
return -ENOMEM;
virtio_gpu_array_add_obj(objs, &bo->base.base);
ret = virtio_gpu_cmd_resource_assign_uuid(vgdev, objs);
if (ret)
return ret;
return 0;
return virtio_gpu_cmd_resource_assign_uuid(vgdev, objs);
}
struct dma_buf *virtgpu_gem_prime_export(struct drm_gem_object *obj,