Skip to content

Commit 5edc16c

Browse files
committed
audio: igo_nr: bound host active_channel_idx before adopting config
Adopt the blob only when igo_nr_check_config_validity() passes so a host index past process_enable[] cannot reach prepare/process. Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1 parent 3f7738d commit 5edc16c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/audio/igo_nr/igo_nr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,9 @@ static void igo_nr_set_igo_params(struct processing_module *mod)
719719
struct comp_dev *dev = mod->dev;
720720

721721
comp_info(dev, "entry");
722-
igo_nr_check_config_validity(dev, cd);
723722

724-
if (p_config) {
723+
/* Adopt the host blob only when new config is valid */
724+
if (p_config && igo_nr_check_config_validity(dev, cd) == 0) {
725725
comp_info(dev, "New config detected.");
726726
cd->config = *p_config;
727727
igo_nr_print_config(mod);

0 commit comments

Comments
 (0)