alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 3/3] ASoC: rockchip: Fix an uninitialized variable compile warning
Date: Mon,  6 May 2019 17:02:24 +0200	[thread overview]
Message-ID: <20190506150224.1394-4-tiwai@suse.de> (raw)
In-Reply-To: <20190506150224.1394-1-tiwai@suse.de>

Paper over a trivial case leading to an uninitialized variable compile
warning:
  sound/soc/rockchip/rockchip_pdm.c:179:3: warning: ‘clk_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Fixes: 624e8e00acaf ("ASoC: rockchip: pdm: fixup pdm fractional div")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/rockchip/rockchip_pdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index 6c0f242db5ef..b9c1d8ad77c1 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -158,7 +158,7 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream,
 	struct rk_pdm_dev *pdm = to_info(dai);
 	unsigned int val = 0;
 	unsigned int clk_rate, clk_div, samplerate;
-	unsigned int clk_src, clk_out;
+	unsigned int clk_src, clk_out = 0;
 	unsigned long m, n;
 	bool change;
 	int ret;
-- 
2.16.4

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

  parent reply	other threads:[~2019-05-06 15:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 15:02 [PATCH 0/3] ASoC: trivial compile warning fixes Takashi Iwai
2019-05-06 15:02 ` [PATCH 1/3] ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n Takashi Iwai
2019-05-07  2:28   ` Applied "ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n" to the asoc tree Mark Brown
2019-05-07  2:30   ` Mark Brown
2019-05-06 15:02 ` [PATCH 2/3] ASoC: SOF: Fix a compile warning with CONFIG_PCI=n Takashi Iwai
2019-05-06 15:40   ` Pierre-Louis Bossart
2019-05-06 18:21   ` Ranjani Sridharan
2019-05-07  2:28   ` Applied "ASoC: SOF: Fix a compile warning with CONFIG_PCI=n" to the asoc tree Mark Brown
2019-05-07  2:30   ` Mark Brown
2019-05-06 15:02 ` Takashi Iwai [this message]
2019-05-07  2:28   ` Applied "ASoC: rockchip: Fix an uninitialized variable compile warning" " Mark Brown
2019-05-07  2:30   ` Mark Brown

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=20190506150224.1394-4-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).