Fix potential (never-observed) oops on rare error path, bugzilla #9594. Fix uses the same test as used earlier.
Also make the adjacent "else" block look like an "else" block instead of hiding like a bug. Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/gadget/ether.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- g26.orig/drivers/usb/gadget/ether.c 2007-12-19 10:06:30.000000000 -0800 +++ g26/drivers/usb/gadget/ether.c 2007-12-19 10:26:56.000000000 -0800 @@ -1067,19 +1067,19 @@ done: /* on error, disable any endpoints */ if (result < 0) { - if (!subset_active(dev)) + if (!subset_active(dev) && dev->status_ep) (void) usb_ep_disable (dev->status_ep); dev->status = NULL; (void) usb_ep_disable (dev->in_ep); (void) usb_ep_disable (dev->out_ep); dev->in = NULL; dev->out = NULL; - } else + } /* activate non-CDC configs right away * this isn't strictly according to the RNDIS spec */ - if (!cdc_active (dev)) { + else if (!cdc_active (dev)) { netif_carrier_on (dev->net); if (netif_running (dev->net)) { spin_unlock (&dev->lock); - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html