diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-03-10 11:27:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-03-10 11:27:26 -0300 |
commit | cafc731a90a72a074c05cf2d7e4a67f3fa596b76 (patch) | |
tree | 251ff3c0ea4e48a563439d6e143a081ca7afe4fc /linux/drivers/media/video/usbvideo/usbvideo.c | |
parent | 463d9d496cf51caabf90b3f64ef602768600bbd1 (diff) | |
parent | 18af961f48808a7aaad697abc64a3c6ee405aef1 (diff) | |
download | mediapointer-dvb-s2-cafc731a90a72a074c05cf2d7e4a67f3fa596b76.tar.gz mediapointer-dvb-s2-cafc731a90a72a074c05cf2d7e4a67f3fa596b76.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/tuner
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/usbvideo/usbvideo.c')
-rw-r--r-- | linux/drivers/media/video/usbvideo/usbvideo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.c b/linux/drivers/media/video/usbvideo/usbvideo.c index f685aca2f..cbfa4078e 100644 --- a/linux/drivers/media/video/usbvideo/usbvideo.c +++ b/linux/drivers/media/video/usbvideo/usbvideo.c @@ -1034,6 +1034,11 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd) info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx", __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits); } + if (uvd->dev == NULL) { + err("%s: uvd->dev == NULL", __func__); + return -EINVAL; + } + uvd->vdev.dev = &uvd->dev->dev; if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) { err("%s: video_register_device failed", __FUNCTION__); return -EPIPE; @@ -1041,10 +1046,6 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd) if (uvd->debug > 1) { info("%s: video_register_device() successful", __FUNCTION__); } - if (uvd->dev == NULL) { - err("%s: uvd->dev == NULL", __FUNCTION__); - return -EINVAL; - } info("%s on /dev/video%d: canvas=%s videosize=%s", (uvd->handle != NULL) ? uvd->handle->drvName : "???", |