From 7c490e2561f271a59605ac31e2582d62c918715d Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 24 Jul 2019 07:27:03 -0400 Subject: media: v4l2-ioctl.c: OR flags in v4l_fill_fmtdesc(), not don't overwrite 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/v4l2-core/v4l2-ioctl.c') diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 9484cc2619e4..bb5b4926538a 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -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, -- cgit v1.2.3