@@ -2189,11 +2189,11 @@ int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
2189
2189
goto out ;
2190
2190
}
2191
2191
2192
- conf = & (tas_fmw -> configs [cfg_no ]);
2193
2192
for (i = 0 , prog_status = 0 ; i < tas_priv -> ndev ; i ++ ) {
2194
2193
if (cfg_info [rca_conf_no ]-> active_dev & (1 << i )) {
2195
- if (tas_priv -> tasdevice [i ].cur_prog != prm_no
2196
- || tas_priv -> force_fwload_status ) {
2194
+ if (prm_no >= 0
2195
+ && (tas_priv -> tasdevice [i ].cur_prog != prm_no
2196
+ || tas_priv -> force_fwload_status )) {
2197
2197
tas_priv -> tasdevice [i ].cur_conf = -1 ;
2198
2198
tas_priv -> tasdevice [i ].is_loading = true;
2199
2199
prog_status ++ ;
@@ -2228,7 +2228,8 @@ int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
2228
2228
}
2229
2229
2230
2230
for (i = 0 , status = 0 ; i < tas_priv -> ndev ; i ++ ) {
2231
- if (tas_priv -> tasdevice [i ].cur_conf != cfg_no
2231
+ if (cfg_no >= 0
2232
+ && tas_priv -> tasdevice [i ].cur_conf != cfg_no
2232
2233
&& (cfg_info [rca_conf_no ]-> active_dev & (1 << i ))
2233
2234
&& (tas_priv -> tasdevice [i ].is_loaderr == false)) {
2234
2235
status ++ ;
@@ -2238,6 +2239,7 @@ int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
2238
2239
}
2239
2240
2240
2241
if (status ) {
2242
+ conf = & (tas_fmw -> configs [cfg_no ]);
2241
2243
status = 0 ;
2242
2244
tasdevice_load_data (tas_priv , & (conf -> dev_data ));
2243
2245
for (i = 0 ; i < tas_priv -> ndev ; i ++ ) {
@@ -2281,7 +2283,7 @@ int tasdevice_prmg_load(void *context, int prm_no)
2281
2283
}
2282
2284
2283
2285
for (i = 0 , prog_status = 0 ; i < tas_priv -> ndev ; i ++ ) {
2284
- if (tas_priv -> tasdevice [i ].cur_prog != prm_no ) {
2286
+ if (prm_no >= 0 && tas_priv -> tasdevice [i ].cur_prog != prm_no ) {
2285
2287
tas_priv -> tasdevice [i ].cur_conf = -1 ;
2286
2288
tas_priv -> tasdevice [i ].is_loading = true;
2287
2289
prog_status ++ ;
@@ -2326,7 +2328,7 @@ int tasdevice_prmg_calibdata_load(void *context, int prm_no)
2326
2328
}
2327
2329
2328
2330
for (i = 0 , prog_status = 0 ; i < tas_priv -> ndev ; i ++ ) {
2329
- if (tas_priv -> tasdevice [i ].cur_prog != prm_no ) {
2331
+ if (prm_no >= 0 && tas_priv -> tasdevice [i ].cur_prog != prm_no ) {
2330
2332
tas_priv -> tasdevice [i ].cur_conf = -1 ;
2331
2333
tas_priv -> tasdevice [i ].is_loading = true;
2332
2334
prog_status ++ ;
0 commit comments