[PATCH] ASoC: cs35l32: prevent unexpected parse result of device tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux