Skip to content
Commit 6f199552 authored by Vlad Buslov's avatar Vlad Buslov Committed by David S. Miller
Browse files

net: fib_notifier: don't return positive values on fib registration



The function fib6_walk_continue() cannot return a positive value when
called from register_fib_notifier(), but ignoring causes static analyzer to
generate warnings in users of register_fib_notifier() that try to convert
returned error code to pointer with ERR_PTR(). Handle such case by
explicitly checking for positive error values and converting them to
-EINVAL in fib6_tables_dump().

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Suggested-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f1b0df7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment