summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/rndis.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/rndis.c')
-rw-r--r--drivers/usb/gadget/rndis.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index c9a0af29ecb6..06b6eba925b5 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -1025,11 +1025,17 @@ int rndis_signal_disconnect (int configNr)
void rndis_uninit (int configNr)
{
+ u8 *buf;
+ u32 length;
+
if (configNr >= RNDIS_MAX_CONFIGS)
return;
rndis_per_dev_params [configNr].used = 0;
rndis_per_dev_params [configNr].state = RNDIS_UNINITIALIZED;
- return;
+
+ /* drain the response queue */
+ while ((buf = rndis_get_next_response(configNr, &length)))
+ rndis_free_response(configNr, buf);
}
void rndis_set_host_mac (int configNr, const u8 *addr)
OpenPOWER on IntegriCloud