summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-02-25 16:43:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-22 10:38:23 +0200
commit6ad7534152d68aae7e18108947465bc8ce15872c (patch)
tree59deea1c1dee7cc1ee82b832cc036a34be8f10fd /drivers/media
parent49e6b88161ac93a1b0f597510882b0e2414051e1 (diff)
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@canonical.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/vivid/vivid-vid-out.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c
index ffe5531dfc81..7f6fa77e4775 100644
--- a/drivers/media/platform/vivid/vivid-vid-out.c
+++ b/drivers/media/platform/vivid/vivid-vid-out.c
@@ -1011,7 +1011,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;
}