projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier.
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
staging
/
vt6656
/
main_usb.c
diff --git
a/drivers/staging/vt6656/main_usb.c
b/drivers/staging/vt6656/main_usb.c
index 3a3fdc58b6da1028032c5c742e76edccd89ab91b..06b966cf5bdd74749fc83661f7bab387f8af52dc 100644
(file)
--- a/
drivers/staging/vt6656/main_usb.c
+++ b/
drivers/staging/vt6656/main_usb.c
@@
-1099,6
+1099,8
@@
static int device_close(struct net_device *dev)
memset(pMgmt->abyCurrBSSID, 0, 6);
pMgmt->eCurrState = WMAC_STATE_IDLE;
memset(pMgmt->abyCurrBSSID, 0, 6);
pMgmt->eCurrState = WMAC_STATE_IDLE;
+ pDevice->flags &= ~DEVICE_FLAGS_OPENED;
+
device_free_tx_bufs(pDevice);
device_free_rx_bufs(pDevice);
device_free_int_bufs(pDevice);
device_free_tx_bufs(pDevice);
device_free_rx_bufs(pDevice);
device_free_int_bufs(pDevice);
@@
-1110,7
+1112,6
@@
static int device_close(struct net_device *dev)
usb_free_urb(pDevice->pInterruptURB);
BSSvClearNodeDBTable(pDevice, 0);
usb_free_urb(pDevice->pInterruptURB);
BSSvClearNodeDBTable(pDevice, 0);
- pDevice->flags &=(~DEVICE_FLAGS_OPENED);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close2 \n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close2 \n");