topology: Fix variable overflow in split_format

The 1 which was 32-bit long, when left-shifted by more than 31 caused
an overflow, which resulted in some of the formats being not supported.

Signed-off-by: Marcin Pietraszko <marcin.pietraszko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Marcin Pietraszko 2019-08-26 13:51:41 +02:00 committed by Takashi Iwai
parent 66a2d53f42
commit 1d7a131f78

View file

@ -321,7 +321,7 @@ static int split_format(struct snd_soc_tplg_stream_caps *caps, char *str)
return -EINVAL; return -EINVAL;
} }
caps->formats |= 1 << format; caps->formats |= 1ull << format;
s = strtok(NULL, ", "); s = strtok(NULL, ", ");
i++; i++;
} }