summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/go7007/go7007-v4l2.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-05-14 14:37:17 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-25 21:30:04 +0200
commita7f3482ddbf2b2507f9db7e442bfa5382c8aaaf7 (patch)
tree169e7416967df3e893170b4f5830cb520cf20b5a /drivers/media/usb/go7007/go7007-v4l2.c
parentmedia: docs: selection: fix misleading sentence about the CROP API (diff)
downloadlinux-a7f3482ddbf2b2507f9db7e442bfa5382c8aaaf7.tar.xz
linux-a7f3482ddbf2b2507f9db7e442bfa5382c8aaaf7.zip
media: go7007: fix two sparse warnings
drivers/media/usb/go7007/go7007-v4l2.c:637:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] drivers/media/usb/go7007/go7007-fw.c:1507:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/go7007/go7007-v4l2.c')
-rw-r--r--drivers/media/usb/go7007/go7007-v4l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c
index 98cd57eaf36a..c55c82f70e54 100644
--- a/drivers/media/usb/go7007/go7007-v4l2.c
+++ b/drivers/media/usb/go7007/go7007-v4l2.c
@@ -634,7 +634,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
if (inp->index >= go->board_info->num_inputs)
return -EINVAL;
- strncpy(inp->name, go->board_info->inputs[inp->index].name,
+ strlcpy(inp->name, go->board_info->inputs[inp->index].name,
sizeof(inp->name));
/* If this board has a tuner, it will be the first input */