Commit 7cea5560 authored by Hongbin Wang's avatar Hongbin Wang Committed by David S. Miller

vxlan: fix error return code in vxlan_fdb_append

When kmalloc and dst_cache_init failed,
should return ENOMEM rather than ENOBUFS.
Signed-off-by: default avatarHongbin Wang <wh_bin@126.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1b808993
...@@ -651,11 +651,11 @@ static int vxlan_fdb_append(struct vxlan_fdb *f, ...@@ -651,11 +651,11 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
rd = kmalloc(sizeof(*rd), GFP_ATOMIC); rd = kmalloc(sizeof(*rd), GFP_ATOMIC);
if (rd == NULL) if (rd == NULL)
return -ENOBUFS; return -ENOMEM;
if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) { if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) {
kfree(rd); kfree(rd);
return -ENOBUFS; return -ENOMEM;
} }
rd->remote_ip = *ip; rd->remote_ip = *ip;
......
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