mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: Return the correct errno code
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b923cda963
commit
ca746c55a7
1 changed files with 1 additions and 1 deletions
|
@ -318,7 +318,7 @@ lookup_protocol:
|
|||
|
||||
WARN_ON(!answer_prot->slab);
|
||||
|
||||
err = -ENOBUFS;
|
||||
err = -ENOMEM;
|
||||
sk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot, kern);
|
||||
if (!sk)
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue