Commit 738acd49 authored by Colin Ian King's avatar Colin Ian King Committed by Maarten Lankhorst

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: a6d3c4d7 ("qxl: hook monitors_config updates into crtc, not encoder.")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210304094928.2280722-1-colin.king@canonical.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
parent ca63d76f
...@@ -328,6 +328,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc, ...@@ -328,6 +328,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
head.id = i; head.id = i;
head.flags = 0; head.flags = 0;
head.surface_id = 0;
oldcount = qdev->monitors_config->count; oldcount = qdev->monitors_config->count;
if (crtc->state->active) { if (crtc->state->active) {
struct drm_display_mode *mode = &crtc->mode; struct drm_display_mode *mode = &crtc->mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment