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>

authored by

Douglas Schilling Landgraf and committed by
Mauro Carvalho Chehab
ff41efcf 6c832e36

+1 -1
+1 -1
drivers/media/video/w9968cf.c
··· 911 911 912 912 for (i = 0; i < W9968CF_URBS; i++) { 913 913 urb = usb_alloc_urb(W9968CF_ISO_PACKETS, GFP_KERNEL); 914 - cam->urb[i] = urb; 915 914 if (!urb) { 916 915 for (j = 0; j < i; j++) 917 916 usb_free_urb(cam->urb[j]); ··· 918 919 return -ENOMEM; 919 920 } 920 921 922 + cam->urb[i] = urb; 921 923 urb->dev = udev; 922 924 urb->context = (void*)cam; 923 925 urb->pipe = usb_rcvisocpipe(udev, 1);