Commit 7c490e25 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 3ac52d0d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,