mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 08:34:20 +08:00
net: return correct error code
When kmemdup called failed and register_net_sysctl return NULL, should return ENOMEM instead of ENOBUFS Signed-off-by: liuguoqiang <liuguoqiang@uniontech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9119570039
commit
6def480181
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user