Soundtrigger service: fix status reporting in loadSoundModel
Fix regression introduced by commit a188af07 cherry-pick
of fix for issue b/67310830
Bug: 64340921
Bug: 67310830
Test: repro steps in b/67310830
Change-Id: Ide98d22dca3a6ed81285f8b543ea31ee69f1e61b
Merged-In: I718f47d913e1b98e567b7e1559f1f4cc1b29b231
diff --git a/services/soundtrigger/SoundTriggerHwService.cpp b/services/soundtrigger/SoundTriggerHwService.cpp
index 5ae3862..894dba0 100644
--- a/services/soundtrigger/SoundTriggerHwService.cpp
+++ b/services/soundtrigger/SoundTriggerHwService.cpp
@@ -583,11 +583,11 @@
unloadSoundModel_l(mModels.valueAt(0)->mHandle, &freedSession);
}
- status_t status = mHwDevice->load_sound_model(mHwDevice,
- sound_model,
- SoundTriggerHwService::soundModelCallback,
- this,
- handle);
+ status = mHwDevice->load_sound_model(mHwDevice,
+ sound_model,
+ SoundTriggerHwService::soundModelCallback,
+ this,
+ handle);
if (status != NO_ERROR) {
goto exit;
}