revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36
[firefly-linux-kernel-4.4.55.git] / drivers / staging / usbip / usbip_event.c
index af3832b03e4b95cb12394ea0ed6b5232d091c9ac..a2566f1075d557014e4bcd443fb02ed36202dc72 100644 (file)
@@ -38,13 +38,21 @@ 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. */
@@ -52,11 +60,13 @@ static int event_handler(struct usbip_device *ud)
                        ud->eh_ops.unusable(ud);
 
                        ud->event &= ~USBIP_EH_UNUSABLE;
+
+                       break;
                }
 
-               /* Stop the error handler. */
-               if (ud->event & USBIP_EH_BYE)
-                       return -1;
+               /* NOTREACHED */
+               printk(KERN_ERR "%s: unknown event\n", __func__);
+               return -1;
        }
 
        return 0;