diff options
| author | Takashi Iwai <tiwai@suse.de> | 2018-01-19 13:57:33 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2018-01-19 13:57:33 +0100 |
| commit | c86d95cb6b7ecda7b7d56e40c24b7d8b9bf9159a (patch) | |
| tree | 3d868496a15be09dfb3a471e7b9dce24c0216d89 /net/sctp/stream.c | |
| parent | 388fdb8f882af67ff8394d9420c1e0e42ba35619 (diff) | |
| parent | 8f05b9c65d817dd288da5f1c6ecc134b66f8a190 (diff) | |
Merge tag 'asoc-v4.16-3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v4.16
Some final updates for the merge window, this brings in some
improvements to the ACPI GPIO handling for Intel and a bunch of fixes.
Diffstat (limited to 'net/sctp/stream.c')
| -rw-r--r-- | net/sctp/stream.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/net/sctp/stream.c b/net/sctp/stream.c index 76ea66be0bbe..524dfeb94c41 100644 --- a/net/sctp/stream.c +++ b/net/sctp/stream.c @@ -156,9 +156,9 @@ int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, sctp_stream_outq_migrate(stream, NULL, outcnt); sched->sched_all(stream); - i = sctp_stream_alloc_out(stream, outcnt, gfp); - if (i) - return i; + ret = sctp_stream_alloc_out(stream, outcnt, gfp); + if (ret) + goto out; stream->outcnt = outcnt; for (i = 0; i < stream->outcnt; i++) @@ -170,19 +170,17 @@ in: if (!incnt) goto out; - i = sctp_stream_alloc_in(stream, incnt, gfp); - if (i) { - ret = -ENOMEM; - goto free; + ret = sctp_stream_alloc_in(stream, incnt, gfp); + if (ret) { + sched->free(stream); + kfree(stream->out); + stream->out = NULL; + stream->outcnt = 0; + goto out; } stream->incnt = incnt; - goto out; -free: - sched->free(stream); - kfree(stream->out); - stream->out = NULL; out: return ret; } |
