]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
l2tp: cleanup l2tp_tunnel_delete calls
authorJiri Slaby <jslaby@suse.cz>
Wed, 25 Oct 2017 13:57:55 +0000 (15:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:31 +0000 (10:10 +0100)
[ Upstream commit 4dc12ffeaeac939097a3f55c881d3dc3523dff0c ]

l2tp_tunnel_delete does not return anything since commit 62b982eeb458
("l2tp: fix race condition in l2tp_tunnel_delete").  But call sites of
l2tp_tunnel_delete still do casts to void to avoid unused return value
warnings.

Kill these now useless casts.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Sabrina Dubroca <sd@queasysnail.net>
Cc: Guillaume Nault <g.nault@alphalink.fr>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Acked-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/l2tp/l2tp_core.c
net/l2tp/l2tp_netlink.c

index 02d61101b108dcc6b8360e3184f9432cf2192955..af22aa8ae35bddd913be37e2816c8dffe9b47792 100644 (file)
@@ -1891,7 +1891,7 @@ static __net_exit void l2tp_exit_net(struct net *net)
 
        rcu_read_lock_bh();
        list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {
-               (void)l2tp_tunnel_delete(tunnel);
+               l2tp_tunnel_delete(tunnel);
        }
        rcu_read_unlock_bh();
 
index 7135f4645d3aa64ae2c37f1c99544de84c650aaa..c28223d8092b18b6e54ac9aed3241dd93a951746 100644 (file)
@@ -282,7 +282,7 @@ static int l2tp_nl_cmd_tunnel_delete(struct sk_buff *skb, struct genl_info *info
        l2tp_tunnel_notify(&l2tp_nl_family, info,
                           tunnel, L2TP_CMD_TUNNEL_DELETE);
 
-       (void) l2tp_tunnel_delete(tunnel);
+       l2tp_tunnel_delete(tunnel);
 
        l2tp_tunnel_dec_refcount(tunnel);