Message ID | 20210204072939.17892-1-zhengyongjun3@huawei.com |
---|---|
State | New |
Headers | show |
Series | [net-next] ipv6: Return the correct errno code | expand |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8b6eb384bac7..347b95bc00fd 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -6943,7 +6943,7 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name, free: kfree(table); out: - return -ENOBUFS; + return -ENOMEM; } static void __addrconf_sysctl_unregister(struct net *net,
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)