[PATCH] usb: dwc3: ep0: remove unnecessary break after return

2014-11-03 Thread Jingoo Han
Fix the following checkpatch warning.

  WARNING: break is not useful after a goto or return

Signed-off-by: Jingoo Han 
---
 drivers/usb/dwc3/ep0.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 711b230..1d91c93 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -441,7 +441,6 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc,
 
case USB_DEVICE_LTM_ENABLE:
return -EINVAL;
-   break;
 
case USB_DEVICE_TEST_MODE:
if ((wIndex & 0xff) != 0)
@@ -550,7 +549,6 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct 
usb_ctrlrequest *ctrl)
switch (state) {
case USB_STATE_DEFAULT:
return -EINVAL;
-   break;
 
case USB_STATE_ADDRESS:
ret = dwc3_ep0_delegate_req(dwc, ctrl);
-- 
1.7.9.5


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: dwc3: ep0: remove unnecessary break after return

2014-11-05 Thread Felipe Balbi
On Tue, Nov 04, 2014 at 10:37:30AM +0900, Jingoo Han wrote:
> Fix the following checkpatch warning.
> 
>   WARNING: break is not useful after a goto or return
> 
> Signed-off-by: Jingoo Han 
> ---
>  drivers/usb/dwc3/ep0.c |2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
> index 711b230..1d91c93 100644
> --- a/drivers/usb/dwc3/ep0.c
> +++ b/drivers/usb/dwc3/ep0.c
> @@ -441,7 +441,6 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc,
>  
>   case USB_DEVICE_LTM_ENABLE:
>   return -EINVAL;
> - break;

heh, I remember we left that because either checkpatch or sparse used to
complain about the lack of it :-) I'll take this one already.

-- 
balbi


signature.asc
Description: Digital signature