summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-04-29 05:49:11 +0000
committerGerd Hoffmann <kraxel@redhat.com>2022-06-09 07:30:13 +0200
commit20f038d074d4fa52e88a36bebf25e81c88d7e6fd (patch)
treee7a7a21bbaab2face21e9b827caf594e1fbc136f
parentd9c1452c0f07c2e0766a6cf3921eca182e26fdf3 (diff)
downloadlinux-20f038d074d4fa52e88a36bebf25e81c88d7e6fd.tar.bz2
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>
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_prime.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
index 55d80b77d9b0..44425f20d91a 100644
--- a/drivers/gpu/drm/virtio/virtgpu_prime.c
+++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
@@ -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,