patch-2.4.0-test3 linux/drivers/usb/usb-uhci.c

Next file: linux/drivers/usb/usb.c
Previous file: linux/drivers/usb/usb-uhci-debug.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/drivers/usb/usb-uhci.c linux/drivers/usb/usb-uhci.c
@@ -1393,8 +1393,10 @@
 {
 	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
 	urb_priv_t *urb_priv = urb->hcpriv;
+#ifdef ISO_SANITY_CHECK
 	int pipe=urb->pipe;
 	int maxsze = usb_maxpacket (urb->dev, pipe, usb_pipeout (pipe));
+#endif
 	int n, ret, last=0;
 	uhci_desc_t *td, **tdm;
 	int status, destination;
@@ -1422,18 +1424,18 @@
 			tdm[n] = 0;
 			continue;
 		}
-		
-		if(urb->iso_frame_desc[n].length > maxsze) {
+
 #ifdef ISO_SANITY_CHECK
+		if(urb->iso_frame_desc[n].length > maxsze) {
 			err("submit_iso: urb->iso_frame_desc[%d].length(%d)>%d",n , urb->iso_frame_desc[n].length, maxsze);
 			tdm[n] = 0;
 			ret=-EINVAL;
 			goto inval;
-#endif
 		}
-		
+		else
+#endif
 		ret = alloc_td (&td, UHCI_PTR_DEPTH);
-	inval:
+
 		if (ret) {
 			int i;	// Cleanup allocated TDs
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)