mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
V4L/DVB (8750): V4L: check inval in video_register_device_index()
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>
This commit is contained in:
parent
ef0e3c26ef
commit
ee7aa9f821
1 changed files with 3 additions and 0 deletions
|
@ -254,6 +254,9 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
|
||||||
int ret;
|
int ret;
|
||||||
char *name_base;
|
char *name_base;
|
||||||
|
|
||||||
|
if (vfd == NULL)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (vfd == NULL)
|
if (vfd == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue