lkml.org 
[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 412/639] media: vivid: fix incorrect assignment operation when setting video mode
    Date
    From: Colin Ian King <colin.king@canonical.com>

    [ Upstream commit d4ec9550e4b2d2e357a46fdc65d8ef3d4d15984c ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/media/platform/vivid/vivid-osd.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/media/platform/vivid/vivid-osd.c b/drivers/media/platform/vivid/vivid-osd.c
    index bbbc1b6938a56..b24596697f579 100644
    --- a/drivers/media/platform/vivid/vivid-osd.c
    +++ b/drivers/media/platform/vivid/vivid-osd.c
    @@ -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;
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-01-24 12:23    [W:4.042 / U:0.296 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site