batman-adv: Drop NULL check before dropping references
The check if a batman-adv related object is NULL or not is now directly in the batadv_*_put functions. It is not needed anymore to perform this check outside these function: The changes were generated using a coccinelle semantic patch: @@ expression E; @@ - if (likely(E != NULL)) ( batadv_backbone_gw_put | batadv_claim_put | batadv_dat_entry_put | batadv_gw_node_put | batadv_hardif_neigh_put | batadv_hardif_put | batadv_nc_node_put | batadv_nc_path_put | batadv_neigh_ifinfo_put | batadv_neigh_node_put | batadv_orig_ifinfo_put | batadv_orig_node_put | batadv_orig_node_vlan_put | batadv_softif_vlan_put | batadv_tp_vars_put | batadv_tt_global_entry_put | batadv_tt_local_entry_put | batadv_tt_orig_list_entry_put | batadv_tt_req_node_put | batadv_tvlv_container_put | batadv_tvlv_handler_put )(E); Signed-off-by:Sven Eckelmann <sven@narfation.org> Signed-off-by:
Simon Wunderlich <sw@simonwunderlich.de>
Showing
- net/batman-adv/bat_iv_ogm.c 25 additions, 50 deletionsnet/batman-adv/bat_iv_ogm.c
- net/batman-adv/bat_v.c 10 additions, 20 deletionsnet/batman-adv/bat_v.c
- net/batman-adv/bat_v_elp.c 3 additions, 6 deletionsnet/batman-adv/bat_v_elp.c
- net/batman-adv/bat_v_ogm.c 13 additions, 26 deletionsnet/batman-adv/bat_v_ogm.c
- net/batman-adv/bridge_loop_avoidance.c 9 additions, 18 deletionsnet/batman-adv/bridge_loop_avoidance.c
- net/batman-adv/distributed-arp-table.c 7 additions, 14 deletionsnet/batman-adv/distributed-arp-table.c
- net/batman-adv/fragmentation.c 2 additions, 4 deletionsnet/batman-adv/fragmentation.c
- net/batman-adv/gateway_client.c 15 additions, 30 deletionsnet/batman-adv/gateway_client.c
- net/batman-adv/hard-interface.c 7 additions, 14 deletionsnet/batman-adv/hard-interface.c
- net/batman-adv/multicast.c 1 addition, 1 deletionnet/batman-adv/multicast.c
- net/batman-adv/netlink.c 2 additions, 4 deletionsnet/batman-adv/netlink.c
- net/batman-adv/network-coding.c 6 additions, 12 deletionsnet/batman-adv/network-coding.c
- net/batman-adv/originator.c 10 additions, 20 deletionsnet/batman-adv/originator.c
- net/batman-adv/routing.c 13 additions, 26 deletionsnet/batman-adv/routing.c
- net/batman-adv/send.c 7 additions, 14 deletionsnet/batman-adv/send.c
- net/batman-adv/soft-interface.c 4 additions, 8 deletionsnet/batman-adv/soft-interface.c
- net/batman-adv/tp_meter.c 8 additions, 16 deletionsnet/batman-adv/tp_meter.c
- net/batman-adv/translation-table.c 26 additions, 52 deletionsnet/batman-adv/translation-table.c
- net/batman-adv/tvlv.c 1 addition, 2 deletionsnet/batman-adv/tvlv.c
Loading
Please register or sign in to comment