projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a36c16
)
ALSA: firewire-tascam: handle error code when getting current source of clock
author
Takashi Sakamoto
<o-takashi@sakamocchi.jp>
Tue, 10 Sep 2019 13:51:51 +0000
(22:51 +0900)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 10 Sep 2019 14:16:00 +0000
(16:16 +0200)
The return value of snd_tscm_stream_get_clock() is ignored. This commit
checks the value and handle error.
Fixes:
e453df44f0d6
("ALSA: firewire-tascam: add PCM functionality")
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link:
https://lore.kernel.org/r/20190910135152.29800-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/tascam/tascam-pcm.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/firewire/tascam/tascam-pcm.c
b/sound/firewire/tascam/tascam-pcm.c
index b5ced5415e40543a050a7755bbef1855df487de3..2377732caa52a3f72f49b381a207ce29a362998a 100644
(file)
--- a/
sound/firewire/tascam/tascam-pcm.c
+++ b/
sound/firewire/tascam/tascam-pcm.c
@@
-56,6
+56,9
@@
static int pcm_open(struct snd_pcm_substream *substream)
goto err_locked;
err = snd_tscm_stream_get_clock(tscm, &clock);
+ if (err < 0)
+ goto err_locked;
+
if (clock != SND_TSCM_CLOCK_INTERNAL ||
amdtp_stream_pcm_running(&tscm->rx_stream) ||
amdtp_stream_pcm_running(&tscm->tx_stream)) {