From: Takashi Sakamoto <o-takashi@sakamocchi.jp> To: clemens@ladisch.de, tiwai@suse.de Cc: alsa-devel@alsa-project.org, stable@vger.kernel.org Subject: [PATCH 1/2] ALSA: firewire-tascam: handle error code when getting current source of clock Date: Tue, 10 Sep 2019 22:51:51 +0900 [thread overview] Message-ID: <20190910135152.29800-2-o-takashi@sakamocchi.jp> (raw) In-Reply-To: <20190910135152.29800-1-o-takashi@sakamocchi.jp> 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> --- sound/firewire/tascam/tascam-pcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/firewire/tascam/tascam-pcm.c b/sound/firewire/tascam/tascam-pcm.c index b5ced5415e40..2377732caa52 100644 --- 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)) { -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Takashi Sakamoto <o-takashi@sakamocchi.jp> To: clemens@ladisch.de, tiwai@suse.de Cc: alsa-devel@alsa-project.org, stable@vger.kernel.org Subject: [alsa-devel] [PATCH 1/2] ALSA: firewire-tascam: handle error code when getting current source of clock Date: Tue, 10 Sep 2019 22:51:51 +0900 [thread overview] Message-ID: <20190910135152.29800-2-o-takashi@sakamocchi.jp> (raw) In-Reply-To: <20190910135152.29800-1-o-takashi@sakamocchi.jp> 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> --- sound/firewire/tascam/tascam-pcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/firewire/tascam/tascam-pcm.c b/sound/firewire/tascam/tascam-pcm.c index b5ced5415e40..2377732caa52 100644 --- 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)) { -- 2.20.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-09-10 13:52 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-10 13:51 [alsa-devel] [PATCH 0/2] ALSA: firewire-tascam: fix to handle error code to read status of sampling clock Takashi Sakamoto 2019-09-10 13:51 ` Takashi Sakamoto [this message] 2019-09-10 13:51 ` [alsa-devel] [PATCH 1/2] ALSA: firewire-tascam: handle error code when getting current source of clock Takashi Sakamoto 2019-09-10 14:17 ` Takashi Iwai 2019-09-10 14:17 ` [alsa-devel] " Takashi Iwai 2019-09-10 13:51 ` [PATCH 2/2] ALSA: firewire-tascam: check intermediate state of clock status and retry Takashi Sakamoto 2019-09-10 13:51 ` [alsa-devel] " Takashi Sakamoto 2019-09-10 14:17 ` Takashi Iwai 2019-09-10 14:17 ` [alsa-devel] " Takashi Iwai
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190910135152.29800-2-o-takashi@sakamocchi.jp \ --to=o-takashi@sakamocchi.jp \ --cc=alsa-devel@alsa-project.org \ --cc=clemens@ladisch.de \ --cc=stable@vger.kernel.org \ --cc=tiwai@suse.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.