diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 24260ced86d2e6f84f95ba9240a5617c070c63e4..78df8f39e57cec7e9280811005b4a417b45ff35d 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2285,7 +2285,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, __be16 port, sock = create_v4_sock(net, port); if (IS_ERR(sock)) { kfree(vs); - return ERR_PTR(PTR_ERR(sock)); + return ERR_CAST(sock); } vs->sock = sock;