Commit cc93d031 authored by Colin Ian King's avatar Colin Ian King Committed by Kleber Sacilotto de Souza

media: vivid: fix incorrect assignment operation when setting video mode

BugLink: https://bugs.launchpad.net/bugs/1864773

[ Upstream commit d4ec9550 ]

The assigment of FB_VMODE_NONINTERLACE to var->vmode should be a
bit-wise or of FB_VMODE_NONINTERLACE instead of an assignment,
otherwise the previous clearing of the FB_VMODE_MASK bits of
var->vmode makes no sense and is redundant.

Addresses-Coverity: ("Unused value")
Fixes: ad4e02d5 ("[media] vivid: add a simple framebuffer device for overlay testing")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 8988fe8c
...@@ -167,7 +167,7 @@ static int _vivid_fb_check_var(struct fb_var_screeninfo *var, struct vivid_dev * ...@@ -167,7 +167,7 @@ static int _vivid_fb_check_var(struct fb_var_screeninfo *var, struct vivid_dev *
var->nonstd = 0; var->nonstd = 0;
var->vmode &= ~FB_VMODE_MASK; var->vmode &= ~FB_VMODE_MASK;
var->vmode = FB_VMODE_NONINTERLACED; var->vmode |= FB_VMODE_NONINTERLACED;
/* Dummy values */ /* Dummy values */
var->hsync_len = 24; var->hsync_len = 24;
......
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