From: Herbert Xu Date: Wed, 12 Jul 2006 20:29:56 +0000 (-0700) Subject: [IPV4]: Fix error handling for fib_insert_node call X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b47b2ec19892ffc2b06ebf138ed4aa141275a1c2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [IPV4]: Fix error handling for fib_insert_node call The error handling around fib_insert_node was broken because we always zeroed the error before checking it. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 1cb65305e102..23fb9d9768e3 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -1252,8 +1252,8 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta, */ if (!fa_head) { - fa_head = fib_insert_node(t, &err, key, plen); err = 0; + fa_head = fib_insert_node(t, &err, key, plen); if (err) goto out_free_new_fa; }