Commit 6def4801 authored by liuguoqiang's avatar liuguoqiang Committed by David S. Miller

net: return correct error code

When kmemdup called failed and register_net_sysctl return NULL, should
return ENOMEM instead of ENOBUFS
Signed-off-by: default avatarliuguoqiang <liuguoqiang@uniontech.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 91195700
......@@ -2591,7 +2591,7 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name,
free:
kfree(t);
out:
return -ENOBUFS;
return -ENOMEM;
}
static void __devinet_sysctl_unregister(struct net *net,
......
Markdown is supported
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