summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorHongbin Wang <wh_bin@126.com>2022-04-07 04:46:22 +0200
committerDavid S. Miller <davem@davemloft.net>2022-04-08 13:35:12 +0200
commit7cea5560bf656b84f9ed01c0cc829d4eecd0640b (patch)
treeae77f6a80215e3319b2fe616478d475039aa7e00 /drivers/net
parentflow_dissector: fix false-positive __read_overflow2_field() warning (diff)
downloadlinux-7cea5560bf656b84f9ed01c0cc829d4eecd0640b.tar.xz
linux-7cea5560bf656b84f9ed01c0cc829d4eecd0640b.zip
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: Hongbin Wang <wh_bin@126.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/vxlan/vxlan_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index de97ff98d36e..8a5e3a6d32d7 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -651,11 +651,11 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
rd = kmalloc(sizeof(*rd), GFP_ATOMIC);
if (rd == NULL)
- return -ENOBUFS;
+ return -ENOMEM;
if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) {
kfree(rd);
- return -ENOBUFS;
+ return -ENOMEM;
}
rd->remote_ip = *ip;