mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
ALSA: firewire-tascam: handle error code when getting current source of clock
The return value of snd_tscm_stream_get_clock() is ignored. This commit
checks the value and handle error.
Fixes: e453df44f0 ("ALSA: firewire-tascam: add PCM functionality")
Cc: <[email protected]> # v4.4+
Signed-off-by: Takashi Sakamoto <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
2a36c16efa
commit
2617120f4d
1 changed files with 3 additions and 0 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue