Skip to content

Commit

Permalink
sctp: remove the never used 'return' and redundant 'break'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wangweidong authored and David S. Miller committed Dec 22, 2013
1 parent 2cc33c7 commit f482f2f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions net/sctp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit f482f2f

Please sign in to comment.