Skip to content

Commit e66eaac

Browse files
P33MP33M
P33M
authored and
P33M
committed
dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue
1 parent c46c85b commit e66eaac

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)