From 2f9bbefb8d2a9766810eee3a80bdce4ec813f45a Mon Sep 17 00:00:00 2001 From: Gunnar Dibbern Date: Thu, 19 Jan 2023 16:32:42 +0100 Subject: pcm: hw - fix return code checking in snd_pcm_hw_hw_refine The isse was introduced in commit 7f2d6c3 Fixes: 7f2d6c3a ("pcm: hw: change rate range syntax") Fixes: https://github.com/alsa-project/alsa-lib/issues/271 Fixes: https://github.com/alsa-project/alsa-lib/pull/293 Signed-off-by: Gunnar Dibbern Signed-off-by: Jaroslav Kysela --- src/pcm/pcm_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index 0588ce5e..daa3e1ff 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -356,7 +356,7 @@ static int snd_pcm_hw_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params) if (hw->rates.min > 0) { err = _snd_pcm_hw_param_set_minmax(params, SND_PCM_HW_PARAM_RATE, hw->rates.min, 0, hw->rates.max + 1, -1); - + if (err < 0) return err; } -- cgit v1.2.1