提交 f3b9f50e 编写于 作者: H Henrik Kretzschmar 提交者: Mauro Carvalho Chehab

V4L/DVB (8750): V4L: check inval in video_register_device_index()

Better check the video_device pointer before using it.
Signed-off-by: NHenrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 5b5aff83
......@@ -257,6 +257,9 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
int ret;
char *name_base;
if (vfd == NULL)
return -EINVAL;
switch (type) {
case VFL_TYPE_GRABBER:
base = MINOR_VFL_TYPE_GRABBER_MIN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册