@@ -197,7 +197,6 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
struct virtio_gpu_fence *fence = NULL;
struct virtio_gpu_object *bo = NULL;
uint32_t handle;
- int ret = 0;
if (plane->state->crtc)
output = drm_crtc_to_virtio_gpu_output(plane->state->crtc);
@@ -221,8 +220,7 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
cpu_to_le32(plane->state->crtc_w),
cpu_to_le32(plane->state->crtc_h),
0, 0, &fence);
- ret = virtio_gpu_object_reserve(bo, false);
- if (!ret) {
+ if (!virtio_gpu_object_reserve(bo, false)) {
reservation_object_add_excl_fence(bo->tbo.resv,
&fence->f);
dma_fence_put(&fence->f);