* [PATCH net-next] ipv6: Return the correct errno code
@ 2021-02-04 7:29 Zheng Yongjun
0 siblings, 0 replies; only message in thread
From: Zheng Yongjun @ 2021-02-04 7:29 UTC (permalink / raw)
To: davem, kuznet, yoshfuji, kuba, netdev, linux-kernel; +Cc: Zheng Yongjun
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(-)
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,
--
2.22.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-04 7:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-04 7:29 [PATCH net-next] ipv6: Return the correct errno code Zheng Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).