aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r8192U_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_core.c')
-rw-r--r--drivers/staging/rtl8192u/r8192U_core.c39
1 files changed, 12 insertions, 27 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index ae4f2b9..da612e6 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2242,12 +2242,8 @@ short rtl8192_usb_initendpoints(struct net_device *dev)
destroy:
- if (priv->pp_rxskb) {
- kfree(priv->pp_rxskb);
- }
- if (priv->rx_urb) {
- kfree(priv->rx_urb);
- }
+ kfree(priv->pp_rxskb);
+ kfree(priv->rx_urb);
priv->pp_rxskb = NULL;
priv->rx_urb = NULL;
@@ -2276,10 +2272,8 @@ void rtl8192_usb_deleteendpoints(struct net_device *dev)
kfree(priv->rx_urb);
priv->rx_urb = NULL;
}
- if(priv->oldaddr){
- kfree(priv->oldaddr);
- priv->oldaddr = NULL;
- }
+ kfree(priv->oldaddr);
+ priv->oldaddr = NULL;
if (priv->pp_rxskb) {
kfree(priv->pp_rxskb);
priv->pp_rxskb = 0;
@@ -2304,14 +2298,10 @@ void rtl8192_usb_deleteendpoints(struct net_device *dev)
}
#else
- if(priv->rx_urb){
- kfree(priv->rx_urb);
- priv->rx_urb = NULL;
- }
- if(priv->oldaddr){
- kfree(priv->oldaddr);
- priv->oldaddr = NULL;
- }
+ kfree(priv->rx_urb);
+ priv->rx_urb = NULL;
+ kfree(priv->oldaddr);
+ priv->oldaddr = NULL;
if (priv->pp_rxskb) {
kfree(priv->pp_rxskb);
priv->pp_rxskb = 0;
@@ -5828,10 +5818,8 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
fail2:
rtl8192_down(dev);
- if (priv->pFirmware) {
- kfree(priv->pFirmware);
- priv->pFirmware = NULL;
- }
+ kfree(priv->pFirmware);
+ priv->pFirmware = NULL;
rtl8192_usb_deleteendpoints(dev);
destroy_workqueue(priv->priv_wq);
mdelay(10);
@@ -5869,11 +5857,8 @@ static void __devexit rtl8192_usb_disconnect(struct usb_interface *intf)
rtl8192_proc_remove_one(dev);
rtl8192_down(dev);
- if (priv->pFirmware)
- {
- kfree(priv->pFirmware);
- priv->pFirmware = NULL;
- }
+ kfree(priv->pFirmware);
+ priv->pFirmware = NULL;
// priv->rf_close(dev);
// rtl8192_SetRFPowerState(dev, eRfOff);
rtl8192_usb_deleteendpoints(dev);