drm/virtio: remove not needed 'ret' var
Subsystems (3)
PATCH 1/1 drm/virtio: remove not needed 'ret' var
From: Gustavo Padovan <[email protected]>
virtio_gpu_cursor_plane_update() doesn't need to know the exact value of virtio_gpu_object_reserve() return, just if it is zero or not. Thus just use the function direct in the return.
Signed-off-by Gustavo Padovan <[email protected]>
--- drivers/gpu/drm/virtio/virtgpu_plane.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/virtio/virtgpu_plane.c +1 -3
@@ -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);
Signature · 6 lines
2.9.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel