From d4c5c2f331199aad3ff5d952de4dc4e28fa6beec Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 1 Jul 2020 14:41:54 +0100 Subject: [PATCH] drm/virtgpu: remove redundant assignments to width and height Variables width and height are being assigned values that are never read. The assignments are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: http://patchwork.freedesktop.org/patch/msgid/20200701134154.549112-1-colin.king@canonical.com Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index af55b334be2f..2c2742b8d657 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -165,8 +165,6 @@ static int virtio_gpu_conn_get_modes(struct drm_connector *connector) count = drm_add_modes_noedid(connector, XRES_MAX, YRES_MAX); if (width == 0 || height == 0) { - width = XRES_DEF; - height = YRES_DEF; drm_set_preferred_mode(connector, XRES_DEF, YRES_DEF); } else { DRM_DEBUG("add mode: %dx%d\n", width, height);