topology: decode: Change declaration of enum decoding function

Size constraints are always checked before invoking
tplg_decode_control_enum1. There is no need to validate it twice.
Alos moved debug print about size to invoking function, since now it's it
responsibility to check size.

Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Piotr Maziarz 2020-08-31 11:08:59 +02:00 committed by Jaroslav Kysela
parent 56a096ca2c
commit c32498603a
3 changed files with 7 additions and 17 deletions

View file

@ -398,7 +398,7 @@ int tplg_decode_control_enum1(snd_tplg_t *tplg,
struct list_head *heap,
struct snd_tplg_enum_template *et,
size_t pos,
void *bin, size_t size);
struct snd_soc_tplg_enum_control *ec);
int tplg_decode_control_enum(snd_tplg_t *tplg, size_t pos,
struct snd_soc_tplg_hdr *hdr,
void *bin, size_t size);