Skip to content
Snippets Groups Projects
Unverified Commit 983272a2 authored by Tom Rix's avatar Tom Rix Committed by Mark Brown
Browse files

ASoC: codecs: aw88395: initialize cur_scene_id to 0


cppcheck reports
sound/soc/codecs/aw88395/aw88395_lib.c:789:6: error: Uninitialized variable: cur_scene_id [uninitvar]
 if (cur_scene_id == 0) {
     ^

Passing a garbage value to aw_dev_parse_data_by_sec_type_v1() will cause a crash
when the value is used as an array index.  This check assumes cur_scene_id is
initialized to 0, so initialize it to 0.

Fixes: 4345865b ("ASoC: codecs: ACF bin parsing and check library file for aw88395")
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20230205015733.1721009-1-trix@redhat.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 700ed3bb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment