projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef0e3c2
)
V4L/DVB (8750): V4L: check inval in video_register_device_index()
author
Henrik Kretzschmar
<henne@nachtwindheim.de>
Fri, 22 Aug 2008 19:41:03 +0000
(16:41 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:52 +0000
(09:36 -0200)
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 6b9f3cb0de989251655d1bd3a113b93c3627d783..8903e41628eb95abb9345f7b0ae731214fbf9ba7 100644
(file)
--- a/
drivers/media/video/v4l2-dev.c
+++ b/
drivers/media/video/v4l2-dev.c
@@
-254,6
+254,9
@@
int video_register_device_index(struct video_device *vfd, int type, int nr,
int ret;
char *name_base;
+ if (vfd == NULL)
+ return -EINVAL;
+
if (vfd == NULL)
return -EINVAL;