aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2014-02-12 23:51:22 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-13 18:33:38 -0500
commit2045ceaed4d54e6e698874d008be727ee5b2a01c (patch)
treea481bc211dd20db90275aceab3721c7a8fb147d9 /net
parent45f7435968363816f8fc4c6abef692808534140d (diff)
net: remove unnecessary return's
One of my pet coding style peeves is the practice of adding extra return; at the end of function. Kill several instances of this in network code. I suppose some coccinelle wizardy could do this automatically. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/gateway_client.c2
-rw-r--r--net/ceph/osd_client.c2
-rw-r--r--net/core/request_sock.c1
-rw-r--r--net/ipv4/route.c1
-rw-r--r--net/ipv4/tcp_output.c1
-rw-r--r--net/l2tp/l2tp_core.c2
-rw-r--r--net/l2tp/l2tp_ppp.c3
-rw-r--r--net/mac802154/mib.c4
-rw-r--r--net/mac802154/rx.c1
-rw-r--r--net/sctp/transport.c1
-rw-r--r--net/wireless/chan.c2
11 files changed, 0 insertions, 20 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 55cf2260d295..d7fafc1009a0 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -389,8 +389,6 @@ out:
389 batadv_neigh_ifinfo_free_ref(router_gw_tq); 389 batadv_neigh_ifinfo_free_ref(router_gw_tq);
390 if (router_orig_tq) 390 if (router_orig_tq)
391 batadv_neigh_ifinfo_free_ref(router_orig_tq); 391 batadv_neigh_ifinfo_free_ref(router_orig_tq);
392
393 return;
394} 392}
395 393
396/** 394/**
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 0676f2b199d6..82750f915865 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -2082,7 +2082,6 @@ bad:
2082 pr_err("osdc handle_map corrupt msg\n"); 2082 pr_err("osdc handle_map corrupt msg\n");
2083 ceph_msg_dump(msg); 2083 ceph_msg_dump(msg);
2084 up_write(&osdc->map_sem); 2084 up_write(&osdc->map_sem);
2085 return;
2086} 2085}
2087 2086
2088/* 2087/*
@@ -2281,7 +2280,6 @@ done_err:
2281 2280
2282bad: 2281bad:
2283 pr_err("osdc handle_watch_notify corrupt msg\n"); 2282 pr_err("osdc handle_watch_notify corrupt msg\n");
2284 return;
2285} 2283}
2286 2284
2287/* 2285/*
diff --git a/net/core/request_sock.c b/net/core/request_sock.c
index 4425148d2b51..467f326126e0 100644
--- a/net/core/request_sock.c
+++ b/net/core/request_sock.c
@@ -221,5 +221,4 @@ void reqsk_fastopen_remove(struct sock *sk, struct request_sock *req,
221out: 221out:
222 spin_unlock_bh(&fastopenq->lock); 222 spin_unlock_bh(&fastopenq->lock);
223 sock_put(lsk); 223 sock_put(lsk);
224 return;
225} 224}
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 25071b48921c..271554c61276 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -697,7 +697,6 @@ static void update_or_create_fnhe(struct fib_nh *nh, __be32 daddr, __be32 gw,
697 697
698out_unlock: 698out_unlock:
699 spin_unlock_bh(&fnhe_lock); 699 spin_unlock_bh(&fnhe_lock);
700 return;
701} 700}
702 701
703static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flowi4 *fl4, 702static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flowi4 *fl4,
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 3be16727f058..48414fcca973 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2071,7 +2071,6 @@ rearm_timer:
2071 if (likely(!err)) 2071 if (likely(!err))
2072 NET_INC_STATS_BH(sock_net(sk), 2072 NET_INC_STATS_BH(sock_net(sk),
2073 LINUX_MIB_TCPLOSSPROBES); 2073 LINUX_MIB_TCPLOSSPROBES);
2074 return;
2075} 2074}
2076 2075
2077/* Push out any pending frames which were held back due to 2076/* Push out any pending frames which were held back due to
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 735d0f60c83a..e5dc42f0e527 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1809,8 +1809,6 @@ void l2tp_session_free(struct l2tp_session *session)
1809 } 1809 }
1810 1810
1811 kfree(session); 1811 kfree(session);
1812
1813 return;
1814} 1812}
1815EXPORT_SYMBOL_GPL(l2tp_session_free); 1813EXPORT_SYMBOL_GPL(l2tp_session_free);
1816 1814
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index be5fadf34739..ec40bc344be6 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -454,13 +454,11 @@ static void pppol2tp_session_close(struct l2tp_session *session)
454 454
455 BUG_ON(session->magic != L2TP_SESSION_MAGIC); 455 BUG_ON(session->magic != L2TP_SESSION_MAGIC);
456 456
457
458 if (sock) { 457 if (sock) {
459 inet_shutdown(sock, 2); 458 inet_shutdown(sock, 2);
460 /* Don't let the session go away before our socket does */ 459 /* Don't let the session go away before our socket does */
461 l2tp_session_inc_refcount(session); 460 l2tp_session_inc_refcount(session);
462 } 461 }
463 return;
464} 462}
465 463
466/* Really kill the session socket. (Called from sock_put() if 464/* Really kill the session socket. (Called from sock_put() if
@@ -474,7 +472,6 @@ static void pppol2tp_session_destruct(struct sock *sk)
474 BUG_ON(session->magic != L2TP_SESSION_MAGIC); 472 BUG_ON(session->magic != L2TP_SESSION_MAGIC);
475 l2tp_session_dec_refcount(session); 473 l2tp_session_dec_refcount(session);
476 } 474 }
477 return;
478} 475}
479 476
480/* Called when the PPPoX socket (session) is closed. 477/* Called when the PPPoX socket (session) is closed.
diff --git a/net/mac802154/mib.c b/net/mac802154/mib.c
index 8ded97cf1c33..f48f40c1da1a 100644
--- a/net/mac802154/mib.c
+++ b/net/mac802154/mib.c
@@ -62,8 +62,6 @@ static void hw_addr_notify(struct work_struct *work)
62 pr_debug("failed changed mask %lx\n", nw->changed); 62 pr_debug("failed changed mask %lx\n", nw->changed);
63 63
64 kfree(nw); 64 kfree(nw);
65
66 return;
67} 65}
68 66
69static void set_hw_addr_filt(struct net_device *dev, unsigned long changed) 67static void set_hw_addr_filt(struct net_device *dev, unsigned long changed)
@@ -79,8 +77,6 @@ static void set_hw_addr_filt(struct net_device *dev, unsigned long changed)
79 work->dev = dev; 77 work->dev = dev;
80 work->changed = changed; 78 work->changed = changed;
81 queue_work(priv->hw->dev_workqueue, &work->work); 79 queue_work(priv->hw->dev_workqueue, &work->work);
82
83 return;
84} 80}
85 81
86void mac802154_dev_set_short_addr(struct net_device *dev, u16 val) 82void mac802154_dev_set_short_addr(struct net_device *dev, u16 val)
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 38548ec2098f..03855b0677cc 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -80,7 +80,6 @@ mac802154_subif_rx(struct ieee802154_dev *hw, struct sk_buff *skb, u8 lqi)
80 mac802154_wpans_rx(priv, skb); 80 mac802154_wpans_rx(priv, skb);
81out: 81out:
82 dev_kfree_skb(skb); 82 dev_kfree_skb(skb);
83 return;
84} 83}
85 84
86static void mac802154_rx_worker(struct work_struct *work) 85static void mac802154_rx_worker(struct work_struct *work)
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index d0810dc5f079..1d348d15b33d 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -652,5 +652,4 @@ void sctp_transport_immediate_rtx(struct sctp_transport *t)
652 if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto)) 652 if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto))
653 sctp_transport_hold(t); 653 sctp_transport_hold(t);
654 } 654 }
655 return;
656} 655}
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 78559b5bbd1f..a04b884f5d04 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -701,6 +701,4 @@ cfg80211_get_chan_state(struct wireless_dev *wdev,
701 case NUM_NL80211_IFTYPES: 701 case NUM_NL80211_IFTYPES:
702 WARN_ON(1); 702 WARN_ON(1);
703 } 703 }
704
705 return;
706} 704}