summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-06-05 11:28:51 -0300
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:49:06 +0900
commit4d730c9894e555b41ebf2b12c8039515669a8ac7 (patch)
treee02782f47bdc54907d38547e6901215d24aca2b7 /drivers/media
parentd38115c0683346eb14c5911399715d605aa61960 (diff)
v4l2-ioctl: log buffer type 0 correctly
If userspace passed the invalid buffer type 0 to the kernel, then the kernel log would show 'type=(null)' since there was no string defined for type 0. Fix this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/v4l2-core/v4l2-ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index aa407cb5f830..be99a18632d3 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -142,6 +142,7 @@ const char *v4l2_field_names[] = {
EXPORT_SYMBOL(v4l2_field_names);
const char *v4l2_type_names[] = {
+ [0] = "0",
[V4L2_BUF_TYPE_VIDEO_CAPTURE] = "vid-cap",
[V4L2_BUF_TYPE_VIDEO_OVERLAY] = "vid-overlay",
[V4L2_BUF_TYPE_VIDEO_OUTPUT] = "vid-out",