diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-08 12:41:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-08 12:41:34 -0500 |
commit | a51482bde22f99c63fbbb57d5d46cc666384e379 (patch) | |
tree | 5482ed1c0803edb2ffbd51035de921fb0f72d82b /net/wanrouter/wanmain.c | |
parent | ac7c98eca88a854755475fcfe1b2bf5f97f90d99 (diff) |
[NET]: kfree cleanup
From: Jesper Juhl <jesper.juhl@gmail.com>
This is the net/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in net/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'net/wanrouter/wanmain.c')
-rw-r--r-- | net/wanrouter/wanmain.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index 13b650ad22e2..bcf7b3faa76a 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c | |||
@@ -714,10 +714,8 @@ static int wanrouter_device_new_if(struct wan_device *wandev, | |||
714 | } | 714 | } |
715 | 715 | ||
716 | /* This code has moved from del_if() function */ | 716 | /* This code has moved from del_if() function */ |
717 | if (dev->priv) { | 717 | kfree(dev->priv); |
718 | kfree(dev->priv); | 718 | dev->priv = NULL; |
719 | dev->priv = NULL; | ||
720 | } | ||
721 | 719 | ||
722 | #ifdef CONFIG_WANPIPE_MULTPPP | 720 | #ifdef CONFIG_WANPIPE_MULTPPP |
723 | if (cnf->config_id == WANCONFIG_MPPP) | 721 | if (cnf->config_id == WANCONFIG_MPPP) |
@@ -851,10 +849,8 @@ static int wanrouter_delete_interface(struct wan_device *wandev, char *name) | |||
851 | 849 | ||
852 | /* Due to new interface linking method using dev->priv, | 850 | /* Due to new interface linking method using dev->priv, |
853 | * this code has moved from del_if() function.*/ | 851 | * this code has moved from del_if() function.*/ |
854 | if (dev->priv){ | 852 | kfree(dev->priv); |
855 | kfree(dev->priv); | 853 | dev->priv=NULL; |
856 | dev->priv=NULL; | ||
857 | } | ||
858 | 854 | ||
859 | unregister_netdev(dev); | 855 | unregister_netdev(dev); |
860 | 856 | ||