Patch "media: vivid: fix assignment of dev->fbuf_out_flags" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: vivid: fix assignment of dev->fbuf_out_flags

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-vivid-fix-assignment-of-dev-fbuf_out_flags.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ef881c25f9b50f4f59c14caeb30228ef08276297
Author: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Date:   Thu Feb 25 16:43:27 2021 +0100

    media: vivid: fix assignment of dev->fbuf_out_flags
    
    [ Upstream commit 5cde22fcc7271812a7944c47b40100df15908358 ]
    
    Currently the chroma_flags and alpha_flags are being zero'd with a bit-wise
    mask and the following statement should be bit-wise or'ing in the new flag
    bits but instead is making a direct assignment.  Fix this by using the |=
    operator rather than an assignment.
    
    Addresses-Coverity: ("Unused value")
    
    Fixes: ef834f7836ec ("[media] vivid: add the video capture and output parts")
    Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/test-drivers/vivid/vivid-vid-out.c b/drivers/media/test-drivers/vivid/vivid-vid-out.c
index ee3446e3217c..cd6c247547d6 100644
--- a/drivers/media/test-drivers/vivid/vivid-vid-out.c
+++ b/drivers/media/test-drivers/vivid/vivid-vid-out.c
@@ -1025,7 +1025,7 @@ int vivid_vid_out_s_fbuf(struct file *file, void *fh,
 		return -EINVAL;
 	}
 	dev->fbuf_out_flags &= ~(chroma_flags | alpha_flags);
-	dev->fbuf_out_flags = a->flags & (chroma_flags | alpha_flags);
+	dev->fbuf_out_flags |= a->flags & (chroma_flags | alpha_flags);
 	return 0;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux