usb_gadget: composite cdc gadget fault handling
These two fixes ensure the new "CDC Composite Device" gadget
fails cleanly when it's loaded on hardware that can't support
this particular gadget driver.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c
index 289c752..d490d02 100644
--- a/drivers/usb/gadget/cdc2.c
+++ b/drivers/usb/gadget/cdc2.c
@@ -124,7 +124,7 @@
return status;
status = acm_bind_config(c, 0);
- if (status == 0)
+ if (status < 0)
return status;
return 0;