diff options
Diffstat (limited to 'drivers/media/video/usbvideo/usbvideo.c')
-rw-r--r-- | drivers/media/video/usbvideo/usbvideo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index fb434b5602a3..5d363be7bc73 100644 --- a/drivers/media/video/usbvideo/usbvideo.c +++ b/drivers/media/video/usbvideo/usbvideo.c | |||
@@ -1034,6 +1034,11 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd) | |||
1034 | info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx", | 1034 | info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx", |
1035 | __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits); | 1035 | __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits); |
1036 | } | 1036 | } |
1037 | if (uvd->dev == NULL) { | ||
1038 | err("%s: uvd->dev == NULL", __FUNCTION__); | ||
1039 | return -EINVAL; | ||
1040 | } | ||
1041 | uvd->vdev.dev=&(uvd->dev->dev); | ||
1037 | if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) { | 1042 | if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) { |
1038 | err("%s: video_register_device failed", __FUNCTION__); | 1043 | err("%s: video_register_device failed", __FUNCTION__); |
1039 | return -EPIPE; | 1044 | return -EPIPE; |
@@ -1041,10 +1046,6 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd) | |||
1041 | if (uvd->debug > 1) { | 1046 | if (uvd->debug > 1) { |
1042 | info("%s: video_register_device() successful", __FUNCTION__); | 1047 | info("%s: video_register_device() successful", __FUNCTION__); |
1043 | } | 1048 | } |
1044 | if (uvd->dev == NULL) { | ||
1045 | err("%s: uvd->dev == NULL", __FUNCTION__); | ||
1046 | return -EINVAL; | ||
1047 | } | ||
1048 | 1049 | ||
1049 | info("%s on /dev/video%d: canvas=%s videosize=%s", | 1050 | info("%s on /dev/video%d: canvas=%s videosize=%s", |
1050 | (uvd->handle != NULL) ? uvd->handle->drvName : "???", | 1051 | (uvd->handle != NULL) ? uvd->handle->drvName : "???", |