]> git.alsa-project.org Git - alsa-lib.git/commitdiff
topology: fix 'parse_tuple_set() - remove dead condition code'
authorJaroslav Kysela <perex@perex.cz>
Wed, 20 Jan 2021 15:58:33 +0000 (16:58 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 20 Jan 2021 16:05:01 +0000 (17:05 +0100)
The whole SND_SOC_TPLG_TUPLE_TYPE_WORD condition part must be
commented out, otherwise the condition is always true.

Fixes: 51e1d486ce ("topology: parse_tuple_set() - remove dead condition code")
BugLink: https://github.com/alsa-project/alsa-lib/issues/114
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/topology/data.c

index 5633cdc34dd9fc7706b4393e353dda83e96acfed..0546d63e478c91aea54dc62d4fbf1632f4432b5d 100644 (file)
@@ -859,11 +859,11 @@ static int parse_tuple_set(snd_config_t *cfg,
                                goto err;
                        }
 
-                       if ((type == SND_SOC_TPLG_TUPLE_TYPE_WORD
-                                       /* && tuple_val > UINT_MAX */)
-                               || (type == SND_SOC_TPLG_TUPLE_TYPE_SHORT
-                                       && tuple_val > USHRT_MAX)
-                               || (type == SND_SOC_TPLG_TUPLE_TYPE_BYTE
+                       if (/* (type == SND_SOC_TPLG_TUPLE_TYPE_WORD
+                                       && tuple_val > UINT_MAX) || */
+                               (type == SND_SOC_TPLG_TUPLE_TYPE_SHORT
+                                       && tuple_val > USHRT_MAX) ||
+                               (type == SND_SOC_TPLG_TUPLE_TYPE_BYTE
                                        && tuple_val > UCHAR_MAX)) {
                                SNDERR("tuple %s: invalid value", id);
                                goto err;