projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b5aff8
)
V4L/DVB (8750): V4L: check inval in video_register_device_index()
author
Henrik Kretzschmar
<henne@nachtwindheim.de>
Wed, 3 Sep 2008 20:11:53 +0000
(17:11 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Wed, 3 Sep 2008 21:37:11 +0000
(18:37 -0300)
Better check the video_device pointer before using it.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-dev.c
patch
|
blob
|
history
diff --git
a/drivers/media/video/v4l2-dev.c
b/drivers/media/video/v4l2-dev.c
index 0320fb84119cf42d25affe9db19bda3eafedc602..155fdec9ac7d7c4fc0aa773581021fbe59ab3355 100644
(file)
--- a/
drivers/media/video/v4l2-dev.c
+++ b/
drivers/media/video/v4l2-dev.c
@@
-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;