summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:39:20 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:39:20 -0800
commitb55813a2e50088ca30df33fa62aeed5d3adb1796 (patch)
treebe50fe404e94869fe854766e190a5753dbc7dd49 /net/sctp
parent368d17e068f691dba5a4f122c271db5ec9b2ebd6 (diff)
parent9e19bb6d7a0959f5028d46e1ab99c50f0d36eda8 (diff)
downloadtalos-obmc-linux-b55813a2e50088ca30df33fa62aeed5d3adb1796.tar.gz
talos-obmc-linux-b55813a2e50088ca30df33fa62aeed5d3adb1796.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER] x_table.c: sem2mutex [IPV4]: Aggregate route entries with different TOS values [TCP]: Mark tcp_*mem[] __read_mostly. [TCP]: Set default max buffers from memory pool size [SCTP]: Fix up sctp_rcv return value [NET]: Take RTNL when unregistering notifier [WIRELESS]: Fix config dependencies. [NET]: Fill in a 32-bit hole in struct sock on 64-bit platforms. [NET]: Ensure device name passed to SO_BINDTODEVICE is NULL terminated. [MODULES]: Don't allow statically declared exports [BRIDGE]: Unaligned accesses in the ethernet bridge
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/input.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index cb78b50868ee..d117ebc75cf8 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -127,7 +127,6 @@ int sctp_rcv(struct sk_buff *skb)
union sctp_addr dest;
int family;
struct sctp_af *af;
- int ret = 0;
if (skb->pkt_type!=PACKET_HOST)
goto discard_it;
@@ -227,16 +226,13 @@ int sctp_rcv(struct sk_buff *skb)
goto discard_release;
nf_reset(skb);
- ret = sk_filter(sk, skb, 1);
- if (ret)
+ if (sk_filter(sk, skb, 1))
goto discard_release;
/* Create an SCTP packet structure. */
chunk = sctp_chunkify(skb, asoc, sk);
- if (!chunk) {
- ret = -ENOMEM;
+ if (!chunk)
goto discard_release;
- }
SCTP_INPUT_CB(skb)->chunk = chunk;
/* Remember what endpoint is to handle this packet. */
@@ -277,11 +273,11 @@ int sctp_rcv(struct sk_buff *skb)
sctp_bh_unlock_sock(sk);
sock_put(sk);
- return ret;
+ return 0;
discard_it:
kfree_skb(skb);
- return ret;
+ return 0;
discard_release:
/* Release any structures we may be holding. */
OpenPOWER on IntegriCloud