diff options
Diffstat (limited to 'net/sctp/input.c')
| -rw-r--r-- | net/sctp/input.c | 12 |
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) | |||
| 127 | union sctp_addr dest; | 127 | union sctp_addr dest; |
| 128 | int family; | 128 | int family; |
| 129 | struct sctp_af *af; | 129 | struct sctp_af *af; |
| 130 | int ret = 0; | ||
| 131 | 130 | ||
| 132 | if (skb->pkt_type!=PACKET_HOST) | 131 | if (skb->pkt_type!=PACKET_HOST) |
| 133 | goto discard_it; | 132 | goto discard_it; |
| @@ -227,16 +226,13 @@ int sctp_rcv(struct sk_buff *skb) | |||
| 227 | goto discard_release; | 226 | goto discard_release; |
| 228 | nf_reset(skb); | 227 | nf_reset(skb); |
| 229 | 228 | ||
| 230 | ret = sk_filter(sk, skb, 1); | 229 | if (sk_filter(sk, skb, 1)) |
| 231 | if (ret) | ||
| 232 | goto discard_release; | 230 | goto discard_release; |
| 233 | 231 | ||
| 234 | /* Create an SCTP packet structure. */ | 232 | /* Create an SCTP packet structure. */ |
| 235 | chunk = sctp_chunkify(skb, asoc, sk); | 233 | chunk = sctp_chunkify(skb, asoc, sk); |
| 236 | if (!chunk) { | 234 | if (!chunk) |
| 237 | ret = -ENOMEM; | ||
| 238 | goto discard_release; | 235 | goto discard_release; |
| 239 | } | ||
| 240 | SCTP_INPUT_CB(skb)->chunk = chunk; | 236 | SCTP_INPUT_CB(skb)->chunk = chunk; |
| 241 | 237 | ||
| 242 | /* Remember what endpoint is to handle this packet. */ | 238 | /* Remember what endpoint is to handle this packet. */ |
| @@ -277,11 +273,11 @@ int sctp_rcv(struct sk_buff *skb) | |||
| 277 | sctp_bh_unlock_sock(sk); | 273 | sctp_bh_unlock_sock(sk); |
| 278 | sock_put(sk); | 274 | sock_put(sk); |
| 279 | 275 | ||
| 280 | return ret; | 276 | return 0; |
| 281 | 277 | ||
| 282 | discard_it: | 278 | discard_it: |
| 283 | kfree_skb(skb); | 279 | kfree_skb(skb); |
| 284 | return ret; | 280 | return 0; |
| 285 | 281 | ||
| 286 | discard_release: | 282 | discard_release: |
| 287 | /* Release any structures we may be holding. */ | 283 | /* Release any structures we may be holding. */ |
