summaryrefslogtreecommitdiff
path: root/sound/firewire/dice
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-09-19 05:21:49 +0300
committerTakashi Iwai <tiwai@suse.de>2015-09-29 13:35:45 +0300
commit547e631ce3886175a33b5ccf67729bdd18e9b7e0 (patch)
tree8c48fda0c7a8c5442d00a100901bd1747e349155 /sound/firewire/dice
parent10b2b6dc1a6bb287411045c788f76d53f96c11bc (diff)
downloadlinux-547e631ce3886175a33b5ccf67729bdd18e9b7e0.tar.xz
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/dice')
-rw-r--r--sound/firewire/dice/dice-stream.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/firewire/dice/dice-stream.c b/sound/firewire/dice/dice-stream.c
index 07dbd01d7a6b..c96306adcae0 100644
--- a/sound/firewire/dice/dice-stream.c
+++ b/sound/firewire/dice/dice-stream.c
@@ -133,7 +133,10 @@ static int start_stream(struct snd_dice *dice, struct amdtp_stream *stream,
stream->double_pcm_frames = false;
}
- amdtp_stream_set_parameters(stream, rate, pcm_chs, midi_ports);
+ err = amdtp_stream_set_parameters(stream, rate, pcm_chs, midi_ports);
+ if (err < 0)
+ goto end;
+
if (mode > 1) {
pcm_chs /= 2;