[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 <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Herbert Xu 2006-07-12 13:29:56 -07:00 committed by David S. Miller
parent 4b260a98f1
commit b47b2ec198
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}