@@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
733733 if (dwc_otg_urb == NULL )
734734 return - ENOMEM ;
735735
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+
740740 dwc_otg_hcd_urb_set_pipeinfo (dwc_otg_urb , usb_pipedevice (urb -> pipe ),
741741 usb_pipeendpoint (urb -> pipe ), ep_type ,
742742 usb_pipein (urb -> pipe ),
@@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
776776 }
777777
778778#if USB_URB_EP_LINKING
779- DWC_SPINLOCK_IRQSAVE (dwc_otg_hcd -> lock , & irqflags );
779+ DWC_SPINLOCK_IRQSAVE (dwc_otg_hcd -> lock , & irqflags );
780780 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 )
783783#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 {
797797#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 );
803803#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+ }
809808 return retval ;
810809}
811810
0 commit comments