summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorwangweidong <wangweidong1@huawei.com>2013-12-19 03:02:42 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-23 00:56:51 +0100
commitf482f2fcd1bd644849bd75412d589cbb40fbaa01 (patch)
treeff7b1a0bfc134a633f75b67a9cfd290554609710 /net/sctp
parentmac802154: fix following checkpath.pl warning Prefer pr_warn(... to pr_warnin... (diff)
downloadlinux-f482f2fcd1bd644849bd75412d589cbb40fbaa01.tar.xz
linux-f482f2fcd1bd644849bd75412d589cbb40fbaa01.zip
sctp: remove the never used 'return' and redundant 'break'
In switch() had do return, and never use the 'return NULL'. The 'break' after return or goto has no effect. Remove it. v2: make it more readable as suggested by Neil. Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/input.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 2a192a7c5d81..e978235c34fc 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -1116,19 +1116,10 @@ static struct sctp_association *__sctp_rcv_lookup_harder(struct net *net,
return NULL;
/* If this is INIT/INIT-ACK look inside the chunk too. */
- switch (ch->type) {
- case SCTP_CID_INIT:
- case SCTP_CID_INIT_ACK:
+ if (ch->type == SCTP_CID_INIT || ch->type == SCTP_CID_INIT_ACK)
return __sctp_rcv_init_lookup(net, skb, laddr, transportp);
- break;
- default:
- return __sctp_rcv_walk_lookup(net, skb, laddr, transportp);
- break;
- }
-
-
- return NULL;
+ return __sctp_rcv_walk_lookup(net, skb, laddr, transportp);
}
/* Lookup an association for an inbound skb. */