@@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
733
733
if (dwc_otg_urb == NULL )
734
734
return - ENOMEM ;
735
735
736
- urb -> hcpriv = dwc_otg_urb ;
737
- if (!dwc_otg_urb && urb -> number_of_packets )
738
- return - ENOMEM ;
739
-
736
+ urb -> hcpriv = dwc_otg_urb ;
737
+ if (!dwc_otg_urb && urb -> number_of_packets )
738
+ return - ENOMEM ;
739
+
740
740
dwc_otg_hcd_urb_set_pipeinfo (dwc_otg_urb , usb_pipedevice (urb -> pipe ),
741
741
usb_pipeendpoint (urb -> pipe ), ep_type ,
742
742
usb_pipein (urb -> pipe ),
@@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
776
776
}
777
777
778
778
#if USB_URB_EP_LINKING
779
- DWC_SPINLOCK_IRQSAVE (dwc_otg_hcd -> lock , & irqflags );
779
+ DWC_SPINLOCK_IRQSAVE (dwc_otg_hcd -> lock , & irqflags );
780
780
retval = usb_hcd_link_urb_to_ep (hcd , urb );
781
- DWC_SPINUNLOCK_IRQRESTORE (dwc_otg_hcd -> lock , irqflags );
782
- if (0 == retval )
781
+ DWC_SPINUNLOCK_IRQRESTORE (dwc_otg_hcd -> lock , irqflags );
782
+ if (0 == retval )
783
783
#endif
784
- {
785
- retval = dwc_otg_hcd_urb_enqueue (dwc_otg_hcd , dwc_otg_urb ,
786
- /*(dwc_otg_qh_t **)*/
787
- ref_ep_hcpriv ,
788
- mem_flags == GFP_ATOMIC ? 1 : 0 );
789
- if (0 == retval ) {
790
- if (alloc_bandwidth ) {
791
- allocate_bus_bandwidth (hcd ,
792
- dwc_otg_hcd_get_ep_bandwidth (
793
- dwc_otg_hcd , * ref_ep_hcpriv ),
794
- urb );
795
- }
796
- } else {
784
+ {
785
+ retval = dwc_otg_hcd_urb_enqueue (dwc_otg_hcd , dwc_otg_urb ,
786
+ /*(dwc_otg_qh_t **)*/
787
+ ref_ep_hcpriv ,
788
+ mem_flags == GFP_ATOMIC ? 1 : 0 );
789
+ if (0 == retval ) {
790
+ if (alloc_bandwidth ) {
791
+ allocate_bus_bandwidth (hcd ,
792
+ dwc_otg_hcd_get_ep_bandwidth (
793
+ dwc_otg_hcd , * ref_ep_hcpriv ),
794
+ urb );
795
+ }
796
+ } else {
797
797
#if USB_URB_EP_LINKING
798
- dwc_irqflags_t irqflags ;
799
- DWC_DEBUGPL (DBG_HCD , "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n" , retval );
800
- DWC_SPINLOCK_IRQSAVE (dwc_otg_hcd -> lock , & irqflags );
801
- usb_hcd_unlink_urb_from_ep (hcd , urb );
802
- DWC_SPINUNLOCK_IRQRESTORE (dwc_otg_hcd -> lock , irqflags );
798
+ dwc_irqflags_t irqflags ;
799
+ DWC_DEBUGPL (DBG_HCD , "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n" , retval );
800
+ DWC_SPINLOCK_IRQSAVE (dwc_otg_hcd -> lock , & irqflags );
801
+ usb_hcd_unlink_urb_from_ep (hcd , urb );
802
+ DWC_SPINUNLOCK_IRQRESTORE (dwc_otg_hcd -> lock , irqflags );
803
803
#endif
804
- if (retval == - DWC_E_NO_DEVICE ) {
805
- retval = - ENODEV ;
806
- }
807
- }
808
- }
804
+ if (retval == - DWC_E_NO_DEVICE )
805
+ retval = - ENODEV ;
806
+ }
807
+ }
809
808
return retval ;
810
809
}
811
810
0 commit comments