From: Hans Verkuil Date: Fri, 5 Jun 2015 14:28:51 +0000 (-0300) Subject: [media] v4l2-ioctl: log buffer type 0 correctly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=839aa56d077972170a074bcbe31bf0d7eba37b24;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index bbeb9ffd5e92..85de4557f696 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",