All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] rate: Check for slave avail update error code
@ 2018-01-07 13:30 Arkadiusz (Arkq) Bokowy
  0 siblings, 0 replies; only message in thread
From: Arkadiusz (Arkq) Bokowy @ 2018-01-07 13:30 UTC (permalink / raw)
  To: alsa-devel

rate: Check for slave avail update error code

Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
---
 src/pcm/pcm_rate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
index 4e0c7ca7..e7d50593 100644
--- a/src/pcm/pcm_rate.c
+++ b/src/pcm/pcm_rate.c
@@ -970,9 +970,11 @@ static snd_pcm_sframes_t
snd_pcm_rate_avail_update(snd_pcm_t *pcm) {
 	snd_pcm_rate_t *rate = pcm->private_data;
 	snd_pcm_t *slave = rate->gen.slave;
-	snd_pcm_uframes_t slave_size;
+	snd_pcm_sframes_t slave_size;
 
 	slave_size = snd_pcm_avail_update(slave);
+	if (slave_size < 0)
+		return slave_size;
 	if (pcm->stream == SND_PCM_STREAM_CAPTURE)
 		goto _capture;
 	snd_pcm_rate_sync_hwptr(pcm);
-- 
2.13.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-07 13:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-07 13:30 [PATCH 1/3] rate: Check for slave avail update error code Arkadiusz (Arkq) Bokowy

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.