]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: hw - fix return code checking in snd_pcm_hw_hw_refine
authorGunnar Dibbern <gunnar.dibbern@lht.dlh.de>
Thu, 19 Jan 2023 15:32:42 +0000 (16:32 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 29 Jan 2023 17:58:51 +0000 (18:58 +0100)
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 <gunnar.dibbern@lht.dlh.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_hw.c

index 0588ce5e7401b00519757f1f8c014190831520a8..daa3e1ff87317b0bdd5f94b0e277cbe76c48de76 100644 (file)
@@ -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;
        }