media: vivid: fix incorrect assignment operation when setting video mode
authorColin Ian King <colin.king@canonical.com>
Tue, 4 Jun 2019 14:55:15 +0000 (10:55 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 5 Jun 2019 19:25:15 +0000 (15:25 -0400)
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: ad4e02d5081d ("[media] vivid: add a simple framebuffer device for overlay testing")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vivid/vivid-osd.c

index 1a89593..f2e789b 100644 (file)
@@ -155,7 +155,7 @@ static int _vivid_fb_check_var(struct fb_var_screeninfo *var, struct vivid_dev *
        var->nonstd = 0;
 
        var->vmode &= ~FB_VMODE_MASK;
-       var->vmode = FB_VMODE_NONINTERLACED;
+       var->vmode |= FB_VMODE_NONINTERLACED;
 
        /* Dummy values */
        var->hsync_len = 24;