All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: brian.austin@cirrus.com, broonie@kernel.org
Cc: alsa-devel@alsa-project.org
Subject: [PATCH] ASoC: cs35l32: prevent unexpected parse result of device tree
Date: Tue, 15 Mar 2016 21:06:13 +0900	[thread overview]
Message-ID: <1458043574-6078-1-git-send-email-o-takashi@sakamocchi.jp> (raw)

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@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

             reply	other threads:[~2016-03-15 12:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 12:06 Takashi Sakamoto [this message]
2016-03-15 12:06 ` [PATCH] ASoC: cs35l32: prevent unexpected parse result of device tree Takashi Sakamoto
2016-03-15 14:30   ` Mark Brown
2016-03-16  3:51     ` Takashi Sakamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458043574-6078-1-git-send-email-o-takashi@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=brian.austin@cirrus.com \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.