]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
media: v4l2-ioctl.c: OR flags in v4l_fill_fmtdesc(), not don't overwrite
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 24 Jul 2019 11:27:03 +0000 (07:27 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 30 Jul 2019 16:12:05 +0000 (12:12 -0400)
If a driver sets a FMT flag in the enum_fmt op, then that will be
ignored since v4l_fill_fmtdesc() overwrites it again.

v4l_fill_fmtdesc() should OR its flag, not overwrite it.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-ioctl.c

index 9484cc2619e444ef923007801dffaeb284d9dc6b..bb5b4926538abd6e79c848bf85ef96e54da88d8d 100644 (file)
@@ -1395,7 +1395,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 
        if (descr)
                WARN_ON(strscpy(fmt->description, descr, sz) < 0);
-       fmt->flags = flags;
+       fmt->flags |= flags;
 }
 
 static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops,