summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-03-04 10:49:28 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2021-03-11 11:11:33 +0100
commit738acd49eb018feb873e0fac8f9517493f6ce2c7 (patch)
treeb4f35931f034561141130a9058b432efc4380e86
parentdrm/ttm: Fix TTM page pool accounting (diff)
downloadlinux-738acd49eb018feb873e0fac8f9517493f6ce2c7.tar.xz
linux-738acd49eb018feb873e0fac8f9517493f6ce2c7.zip
qxl: Fix uninitialised struct field head.surface_id
The surface_id struct field in head is not being initialized and static analysis warns that this is being passed through to dev->monitors_config->heads[i] on an assignment. Clear up this warning by initializing it to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: a6d3c4d79822 ("qxl: hook monitors_config updates into crtc, not encoder.") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: http://patchwork.freedesktop.org/patch/msgid/20210304094928.2280722-1-colin.king@canonical.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 012bce0cdb65..10738e04c09b 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -328,6 +328,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
head.id = i;
head.flags = 0;
+ head.surface_id = 0;
oldcount = qdev->monitors_config->count;
if (crtc->state->active) {
struct drm_display_mode *mode = &crtc->mode;