mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 00:56:45 +07: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
5b5aff83a5
commit
f3b9f50ef7
@ -257,6 +257,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;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case VFL_TYPE_GRABBER:
|
case VFL_TYPE_GRABBER:
|
||||||
base = MINOR_VFL_TYPE_GRABBER_MIN;
|
base = MINOR_VFL_TYPE_GRABBER_MIN;
|
||||||
|
Loading…
Reference in New Issue
Block a user