]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: dwc2: Fix dead code in hcd.c
authorVardan Mikayelyan <mvardan@synopsys.com>
Fri, 11 Nov 2016 01:38:19 +0000 (17:38 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 18 Nov 2016 11:54:16 +0000 (13:54 +0200)
Because usb_pipetype() masks urb->pipe, the default case can never be
hit. Remove it. This cleans up a coverity warning.

Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/hcd.c

index 3ac0085f81b2e66f1055a46bd025f42c65370cd6..e7b6097ceceabc5e0e7308c0748c4baf2fd84d92 100644 (file)
@@ -4510,9 +4510,6 @@ static void dwc2_dump_urb_info(struct usb_hcd *hcd, struct urb *urb,
        case PIPE_ISOCHRONOUS:
                pipetype = "ISOCHRONOUS";
                break;
-       default:
-               pipetype = "UNKNOWN";
-               break;
        }
 
        dev_vdbg(hsotg->dev, "  Endpoint type: %s %s (%s)\n", pipetype,
@@ -4609,8 +4606,6 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
        case PIPE_INTERRUPT:
                ep_type = USB_ENDPOINT_XFER_INT;
                break;
-       default:
-               dev_warn(hsotg->dev, "Wrong ep type\n");
        }
 
        dwc2_urb = dwc2_hcd_urb_alloc(hsotg, urb->number_of_packets,