Skip to content

Commit 7cea556

Browse files
wang0666davem330
authored andcommitted
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>
1 parent 1b80899 commit 7cea556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/vxlan/vxlan_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,11 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
651651

652652
rd = kmalloc(sizeof(*rd), GFP_ATOMIC);
653653
if (rd == NULL)
654-
return -ENOBUFS;
654+
return -ENOMEM;
655655

656656
if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) {
657657
kfree(rd);
658-
return -ENOBUFS;
658+
return -ENOMEM;
659659
}
660660

661661
rd->remote_ip = *ip;

0 commit comments

Comments
 (0)