summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/ether.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 283049e..8126f76 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1726,14 +1726,13 @@ autoconf_fail:
/* ... and maybe likewise for status transfer */
#if defined(DEV_CONFIG_CDC)
if (dev->status_ep) {
- dev->stat_req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL);
- dev->stat_req->buf = status_req;
+ dev->stat_req = usb_ep_alloc_request(dev->status_ep, GFP_KERNEL);
if (!dev->stat_req) {
- dev->stat_req->buf=NULL;
- usb_ep_free_request (gadget->ep0, dev->req);
+ usb_ep_free_request (dev->status_ep, dev->req);
goto fail;
}
+ dev->stat_req->buf = status_req;
dev->stat_req->context = NULL;
}
#endif