mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[NET]: kfree cleanup
From: Jesper Juhl <[email protected]> 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 <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Acked-by: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
parent
ac7c98eca8
commit
a51482bde2
47 changed files with 99 additions and 191 deletions
|
|
@ -240,8 +240,7 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
|
|||
if ((s = rose_neigh_list) == rose_neigh) {
|
||||
rose_neigh_list = rose_neigh->next;
|
||||
spin_unlock_bh(&rose_neigh_list_lock);
|
||||
if (rose_neigh->digipeat != NULL)
|
||||
kfree(rose_neigh->digipeat);
|
||||
kfree(rose_neigh->digipeat);
|
||||
kfree(rose_neigh);
|
||||
return;
|
||||
}
|
||||
|
|
@ -250,8 +249,7 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
|
|||
if (s->next == rose_neigh) {
|
||||
s->next = rose_neigh->next;
|
||||
spin_unlock_bh(&rose_neigh_list_lock);
|
||||
if (rose_neigh->digipeat != NULL)
|
||||
kfree(rose_neigh->digipeat);
|
||||
kfree(rose_neigh->digipeat);
|
||||
kfree(rose_neigh);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue