diff options
-rw-r--r-- | drivers/usb/gadget/ether.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 9e732bff9df0..a70e255402b8 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -1067,19 +1067,19 @@ done: | |||
1067 | 1067 | ||
1068 | /* on error, disable any endpoints */ | 1068 | /* on error, disable any endpoints */ |
1069 | if (result < 0) { | 1069 | if (result < 0) { |
1070 | if (!subset_active(dev)) | 1070 | if (!subset_active(dev) && dev->status_ep) |
1071 | (void) usb_ep_disable (dev->status_ep); | 1071 | (void) usb_ep_disable (dev->status_ep); |
1072 | dev->status = NULL; | 1072 | dev->status = NULL; |
1073 | (void) usb_ep_disable (dev->in_ep); | 1073 | (void) usb_ep_disable (dev->in_ep); |
1074 | (void) usb_ep_disable (dev->out_ep); | 1074 | (void) usb_ep_disable (dev->out_ep); |
1075 | dev->in = NULL; | 1075 | dev->in = NULL; |
1076 | dev->out = NULL; | 1076 | dev->out = NULL; |
1077 | } else | 1077 | } |
1078 | 1078 | ||
1079 | /* activate non-CDC configs right away | 1079 | /* activate non-CDC configs right away |
1080 | * this isn't strictly according to the RNDIS spec | 1080 | * this isn't strictly according to the RNDIS spec |
1081 | */ | 1081 | */ |
1082 | if (!cdc_active (dev)) { | 1082 | else if (!cdc_active (dev)) { |
1083 | netif_carrier_on (dev->net); | 1083 | netif_carrier_on (dev->net); |
1084 | if (netif_running (dev->net)) { | 1084 | if (netif_running (dev->net)) { |
1085 | spin_unlock (&dev->lock); | 1085 | spin_unlock (&dev->lock); |