aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-08 12:41:34 -0500
committerDavid S. Miller <davem@davemloft.net>2005-11-08 12:41:34 -0500
commita51482bde22f99c63fbbb57d5d46cc666384e379 (patch)
tree5482ed1c0803edb2ffbd51035de921fb0f72d82b /net/rose
parentac7c98eca88a854755475fcfe1b2bf5f97f90d99 (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/rose')
-rw-r--r--net/rose/rose_route.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index b18fe5043019..8631b65a7312 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -240,8 +240,7 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
240 if ((s = rose_neigh_list) == rose_neigh) { 240 if ((s = rose_neigh_list) == rose_neigh) {
241 rose_neigh_list = rose_neigh->next; 241 rose_neigh_list = rose_neigh->next;
242 spin_unlock_bh(&rose_neigh_list_lock); 242 spin_unlock_bh(&rose_neigh_list_lock);
243 if (rose_neigh->digipeat != NULL) 243 kfree(rose_neigh->digipeat);
244 kfree(rose_neigh->digipeat);
245 kfree(rose_neigh); 244 kfree(rose_neigh);
246 return; 245 return;
247 } 246 }
@@ -250,8 +249,7 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
250 if (s->next == rose_neigh) { 249 if (s->next == rose_neigh) {
251 s->next = rose_neigh->next; 250 s->next = rose_neigh->next;
252 spin_unlock_bh(&rose_neigh_list_lock); 251 spin_unlock_bh(&rose_neigh_list_lock);
253 if (rose_neigh->digipeat != NULL) 252 kfree(rose_neigh->digipeat);
254 kfree(rose_neigh->digipeat);
255 kfree(rose_neigh); 253 kfree(rose_neigh);
256 return; 254 return;
257 } 255 }