Merge branch 'xen/dev-evtchn' into upstream/evtchn
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / usbip / usbip_event.c
index a2566f1075d557014e4bcd443fb02ed36202dc72..af3832b03e4b95cb12394ea0ed6b5232d091c9ac 100644 (file)
@@ -38,21 +38,13 @@ static int event_handler(struct usbip_device *ud)
                        ud->eh_ops.shutdown(ud);
 
                        ud->event &= ~USBIP_EH_SHUTDOWN;
-
-                       break;
                }
 
-               /* Stop the error handler. */
-               if (ud->event & USBIP_EH_BYE)
-                       return -1;
-
                /* Reset the device. */
                if (ud->event & USBIP_EH_RESET) {
                        ud->eh_ops.reset(ud);
 
                        ud->event &= ~USBIP_EH_RESET;
-
-                       break;
                }
 
                /* Mark the device as unusable. */
@@ -60,13 +52,11 @@ static int event_handler(struct usbip_device *ud)
                        ud->eh_ops.unusable(ud);
 
                        ud->event &= ~USBIP_EH_UNUSABLE;
-
-                       break;
                }
 
-               /* NOTREACHED */
-               printk(KERN_ERR "%s: unknown event\n", __func__);
-               return -1;
+               /* Stop the error handler. */
+               if (ud->event & USBIP_EH_BYE)
+                       return -1;
        }
 
        return 0;