summaryrefslogtreecommitdiffstats
path: root/sound/firewire/fireworks
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-09-19 04:21:49 +0200
committerTakashi Iwai <tiwai@suse.de>2015-09-29 12:35:45 +0200
commit547e631ce3886175a33b5ccf67729bdd18e9b7e0 (patch)
tree8c48fda0c7a8c5442d00a100901bd1747e349155 /sound/firewire/fireworks
parentALSA: firewire-lib: arrange structure for AMDTP stream (diff)
downloadlinux-547e631ce3886175a33b5ccf67729bdd18e9b7e0.tar.xz
linux-547e631ce3886175a33b5ccf67729bdd18e9b7e0.zip
ALSA: firewire-lib: return error code when amdtp_stream_set_parameters() detects error
Currently, amdtp_stream_set_parameters() returns no error even if wrong arguments are given. This is not good for streaming layer because drivers can continue processing ignoring capability of streaming layer. This commit changes this function to return error code. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireworks')
-rw-r--r--sound/firewire/fireworks/fireworks_stream.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/firewire/fireworks/fireworks_stream.c b/sound/firewire/fireworks/fireworks_stream.c
index 7e353f1f7bff..dfefccff3c55 100644
--- a/sound/firewire/fireworks/fireworks_stream.c
+++ b/sound/firewire/fireworks/fireworks_stream.c
@@ -73,8 +73,10 @@ start_stream(struct snd_efw *efw, struct amdtp_stream *stream,
midi_ports = efw->midi_in_ports;
}
- amdtp_stream_set_parameters(stream, sampling_rate,
- pcm_channels, midi_ports);
+ err = amdtp_stream_set_parameters(stream, sampling_rate,
+ pcm_channels, midi_ports);
+ if (err < 0)
+ goto end;
/* establish connection via CMP */
err = cmp_connection_establish(conn,