Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f482f2fc authored by wangweidong's avatar wangweidong Committed by David S. Miller
Browse files

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: default avatarWang Weidong <wangweidong1@huawei.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2cc33c7e
Loading
Loading
Loading
Loading
+2 −11
Original line number Original line Diff line number Diff line
@@ -1116,19 +1116,10 @@ static struct sctp_association *__sctp_rcv_lookup_harder(struct net *net,
		return NULL;
		return NULL;


	/* If this is INIT/INIT-ACK look inside the chunk too. */
	/* If this is INIT/INIT-ACK look inside the chunk too. */
	switch (ch->type) {
	if (ch->type == SCTP_CID_INIT || ch->type == SCTP_CID_INIT_ACK)
	case SCTP_CID_INIT:
	case SCTP_CID_INIT_ACK:
		return __sctp_rcv_init_lookup(net, skb, laddr, transportp);
		return __sctp_rcv_init_lookup(net, skb, laddr, transportp);
		break;


	default:
	return __sctp_rcv_walk_lookup(net, skb, laddr, transportp);
	return __sctp_rcv_walk_lookup(net, skb, laddr, transportp);
		break;
	}


	return NULL;
}
}


/* Lookup an association for an inbound skb. */
/* Lookup an association for an inbound skb. */