From: Gunnar Dibbern Date: Thu, 19 Jan 2023 15:32:42 +0000 (+0100) Subject: pcm: hw - fix return code checking in snd_pcm_hw_hw_refine X-Git-Tag: v1.2.9~17 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=2f9bbefb8d2a9766810eee3a80bdce4ec813f45a;p=alsa-lib.git 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 --- 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; }