diff options
Diffstat (limited to 'drivers/net/wireless/strip.c')
-rw-r--r-- | drivers/net/wireless/strip.c | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index 7bc7fc823128..d25264ba0c0e 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -860,12 +860,9 @@ static int allocate_buffers(struct strip *strip_info, int mtu) | |||
860 | strip_info->mtu = dev->mtu = mtu; | 860 | strip_info->mtu = dev->mtu = mtu; |
861 | return (1); | 861 | return (1); |
862 | } | 862 | } |
863 | if (r) | 863 | kfree(r); |
864 | kfree(r); | 864 | kfree(s); |
865 | if (s) | 865 | kfree(t); |
866 | kfree(s); | ||
867 | if (t) | ||
868 | kfree(t); | ||
869 | return (0); | 866 | return (0); |
870 | } | 867 | } |
871 | 868 | ||
@@ -922,13 +919,9 @@ static int strip_change_mtu(struct net_device *dev, int new_mtu) | |||
922 | printk(KERN_NOTICE "%s: strip MTU changed fom %d to %d.\n", | 919 | printk(KERN_NOTICE "%s: strip MTU changed fom %d to %d.\n", |
923 | strip_info->dev->name, old_mtu, strip_info->mtu); | 920 | strip_info->dev->name, old_mtu, strip_info->mtu); |
924 | 921 | ||
925 | if (orbuff) | 922 | kfree(orbuff); |
926 | kfree(orbuff); | 923 | kfree(osbuff); |
927 | if (osbuff) | 924 | kfree(otbuff); |
928 | kfree(osbuff); | ||
929 | if (otbuff) | ||
930 | kfree(otbuff); | ||
931 | |||
932 | return 0; | 925 | return 0; |
933 | } | 926 | } |
934 | 927 | ||
@@ -2498,18 +2491,13 @@ static int strip_close_low(struct net_device *dev) | |||
2498 | /* | 2491 | /* |
2499 | * Free all STRIP frame buffers. | 2492 | * Free all STRIP frame buffers. |
2500 | */ | 2493 | */ |
2501 | if (strip_info->rx_buff) { | 2494 | kfree(strip_info->rx_buff); |
2502 | kfree(strip_info->rx_buff); | 2495 | strip_info->rx_buff = NULL; |
2503 | strip_info->rx_buff = NULL; | 2496 | kfree(strip_info->sx_buff); |
2504 | } | 2497 | strip_info->sx_buff = NULL; |
2505 | if (strip_info->sx_buff) { | 2498 | kfree(strip_info->tx_buff); |
2506 | kfree(strip_info->sx_buff); | 2499 | strip_info->tx_buff = NULL; |
2507 | strip_info->sx_buff = NULL; | 2500 | |
2508 | } | ||
2509 | if (strip_info->tx_buff) { | ||
2510 | kfree(strip_info->tx_buff); | ||
2511 | strip_info->tx_buff = NULL; | ||
2512 | } | ||
2513 | del_timer(&strip_info->idle_timer); | 2501 | del_timer(&strip_info->idle_timer); |
2514 | return 0; | 2502 | return 0; |
2515 | } | 2503 | } |