[PATCH] drm/virtio: remove not needed 'ret' var
Gustavo Padovan
gustavo at padovan.org
Sun Apr 9 23:58:57 UTC 2017
From: Gustavo Padovan <gustavo.padovan at collabora.com>
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 <gustavo.padovan at collabora.com>
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index adcdbd0..76d5fed 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -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);
--
2.9.3
More information about the dri-devel
mailing list