diff options
Diffstat (limited to 'linux/drivers/media/video/v4l2-dev.c')
-rw-r--r-- | linux/drivers/media/video/v4l2-dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/v4l2-dev.c b/linux/drivers/media/video/v4l2-dev.c index a244c1296..b5a65beca 100644 --- a/linux/drivers/media/video/v4l2-dev.c +++ b/linux/drivers/media/video/v4l2-dev.c @@ -271,6 +271,9 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, /* the release callback MUST be present */ BUG_ON(!vfd->release); + if (vfd == NULL) + return -EINVAL; + switch (type) { case VFL_TYPE_GRABBER: base = MINOR_VFL_TYPE_GRABBER_MIN; |