Skip to contentSkip to conversation

drivers: usb: usbip: Add missing break statement to switch

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Feb 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: usb: usbip: Add missing break statement to switch

Add missing break statement to prevent the code for case USB_PORT_FEAT_C_RESET falling through to the default case.

Addresses-Coverity-ID: 143155

---
 drivers/usb/usbip/vhci_hcd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/usbip/vhci_hcd.c +1 -0
index c4724fb..e4cb9f0 100644
@@ -313,6 +313,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 			default:
 				break;
 			}
+			break;
 		default:
 			usbip_dbg_vhci_rh(" ClearPortFeature: default %x\n",
 					  wValue);
Signature · 1 line
2.5.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Gustavo A. R. Silva

Add missing break statement to prevent the code for case USB_PORT_FEAT_C_RESET falling through to the default case.

Addresses-Coverity-ID: 143155

---
 drivers/usb/usbip/vhci_hcd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/usbip/vhci_hcd.c +0 -0
index c4724fb..e4cb9f0 100644

drivers/usb/usbip/vhci_hcd.c static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · line 319

Quoted 7 lines
drivers/usb/usbip/vhci_hcd.c +1 -0
@@ -313,6 +313,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 			default:
 				break;
 			}
+			break;
 		default:
 			usbip_dbg_vhci_rh(" ClearPortFeature: default %x\n",
 					  wValue);

Looks good to me.

thanks,
-- Shuah