diff options
| author | Geert Uytterhoeven <[email protected]> | 2014-08-08 15:29:35 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2014-08-11 19:01:13 +0000 |
| commit | 6912831623c5bbd38c6c26039d5f821557e5f541 (patch) | |
| tree | e3b85d99c34d370673252b22a4800afb0d0bdb07 /lib/dynamic_debug.c | |
| parent | Merge remote-tracking branch 'asoc/topic/wm8985' into asoc-next (diff) | |
| download | kernel-6912831623c5bbd38c6c26039d5f821557e5f541.tar.gz kernel-6912831623c5bbd38c6c26039d5f821557e5f541.zip | |
ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double()
If soc_dapm_read() fails, reg_val will be uninitialized, and bogus
values will be written later:
sound/soc/soc-dapm.c: In function 'snd_soc_dapm_get_enum_double':
sound/soc/soc-dapm.c:2862:15: warning: 'reg_val' may be used uninitialized in this function [-Wmaybe-uninitialized]
unsigned int reg_val, val;
^
Return early on error to fix this.
Introduced by commit ce0fc93ae56e2ba50ff8c220d69e4e860e889320 ("ASoC:
Add DAPM support at the component level").
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions
