[alsa-devel] [PATCH] ASoC: cs35l32: prevent unexpected parse result of device tree
Takashi Sakamoto
o-takashi at sakamocchi.jp
Tue Mar 15 13:06:13 CET 2016
Hi,
When compiling recent kernel, I got a warning caused by a codec in ASoC.
sound/soc/codecs/cs35l32.c: In function ‘cs35l32_i2c_probe’:
sound/soc/codecs/cs35l32.c:278:2: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (val) {
^
sound/soc/codecs/cs35l32.c:272:15: note: ‘val’ was declared here
unsigned int val;
^
I'm not an ASoC developer, furthermore, have no knowledge about this Cirrus
codec. Although, as a quick glance it may include a logical bug to assign wrong
information to structure member as a reult of parsing device tree.
This patch is my proposal to fix it. I'm happy to receive your comments.
Regards
Takashi Sakamoto (1):
ASoC: cs35l32: fix unexpected parse result of device tree blob
sound/soc/codecs/cs35l32.c | 4 ++++
1 file changed, 4 insertions(+)
--
2.7.0
More information about the Alsa-devel
mailing list