diff options
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 922b39e79b8e..231f5dbb18b4 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -366,12 +366,11 @@ int video_register_device_index(struct video_device *vdev, int type, int nr, | |||
366 | 366 | ||
367 | /* A minor value of -1 marks this video device as never | 367 | /* A minor value of -1 marks this video device as never |
368 | having been registered */ | 368 | having been registered */ |
369 | if (vdev) | 369 | vdev->minor = -1; |
370 | vdev->minor = -1; | ||
371 | 370 | ||
372 | /* the release callback MUST be present */ | 371 | /* the release callback MUST be present */ |
373 | WARN_ON(!vdev || !vdev->release); | 372 | WARN_ON(!vdev->release); |
374 | if (!vdev || !vdev->release) | 373 | if (!vdev->release) |
375 | return -EINVAL; | 374 | return -EINVAL; |
376 | 375 | ||
377 | /* Part 1: check device type */ | 376 | /* Part 1: check device type */ |