From: Minghao Chi <chi.minghao@xxxxxxxxxx> Simplify the return expression. Reported-by: Zeal Robot <zealci@xxxxxxxxxx> Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx> --- drivers/gpu/drm/virtio/virtgpu_prime.c | 6 +----- 1 file changed, 1 insertion(+), 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, -- 2.25.1