Skip to content

Commit

Permalink
V4L/DVB (8750): V4L: check inval in video_register_device_index()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Henrik Kretzschmar authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent ef0e3c2 commit ee7aa9f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ee7aa9f

Please sign in to comment.