summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/w9968cf.c
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-09-04 11:19:27 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-29 08:24:57 -0300
commitff41efcff635717ebe032437c4d6ee22badc9960 (patch)
tree5d81160dcf3c83e47fceb1a523f5ef69084003d3 /drivers/media/video/w9968cf.c
parent6c832e36447821779344f3d33970a4a7a10245cc (diff)
downloadlinux-stable-ff41efcff635717ebe032437c4d6ee22badc9960.tar.gz
linux-stable-ff41efcff635717ebe032437c4d6ee22badc9960.tar.bz2
linux-stable-ff41efcff635717ebe032437c4d6ee22badc9960.zip
V4L/DVB (8883): w9968cf: Fix order of usb_alloc_urb validation
Fixed order of usb_alloc_urb pointer validation. Cc: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/w9968cf.c')
-rw-r--r--drivers/media/video/w9968cf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c
index 168baabe4659..11edf79f57be 100644
--- a/drivers/media/video/w9968cf.c
+++ b/drivers/media/video/w9968cf.c
@@ -911,7 +911,6 @@ static int w9968cf_start_transfer(struct w9968cf_device* cam)
for (i = 0; i < W9968CF_URBS; i++) {
urb = usb_alloc_urb(W9968CF_ISO_PACKETS, GFP_KERNEL);
- cam->urb[i] = urb;
if (!urb) {
for (j = 0; j < i; j++)
usb_free_urb(cam->urb[j]);
@@ -919,6 +918,7 @@ static int w9968cf_start_transfer(struct w9968cf_device* cam)
return -ENOMEM;
}
+ cam->urb[i] = urb;
urb->dev = udev;
urb->context = (void*)cam;
urb->pipe = usb_rcvisocpipe(udev, 1);