All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 19/21] ASoC: Intel: Skylake: skl-topology: remove redundant assignments
Date: Thu, 13 Aug 2020 15:01:45 -0500	[thread overview]
Message-ID: <20200813200147.61990-20-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20200813200147.61990-1-pierre-louis.bossart@linux.intel.com>

Cppcheck complains about possible NULL pointer dereferences but the
assignments are actually not needed before walking through lists.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/skylake/skl-topology.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index b7d2d97d12a7..3928a1645820 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -550,8 +550,8 @@ static int skl_tplg_unload_pipe_modules(struct skl_dev *skl,
 	 struct skl_pipe *pipe)
 {
 	int ret = 0;
-	struct skl_pipe_module *w_module = NULL;
-	struct skl_module_cfg *mconfig = NULL;
+	struct skl_pipe_module *w_module;
+	struct skl_module_cfg *mconfig;
 
 	list_for_each_entry(w_module, &pipe->w_list, node) {
 		guid_t *uuid_mod;
@@ -1893,7 +1893,7 @@ static int skl_tplg_be_set_src_pipe_params(struct snd_soc_dai *dai,
 static int skl_tplg_be_set_sink_pipe_params(struct snd_soc_dai *dai,
 	struct snd_soc_dapm_widget *w, struct skl_pipe_params *params)
 {
-	struct snd_soc_dapm_path *p = NULL;
+	struct snd_soc_dapm_path *p;
 	int ret = -EIO;
 
 	snd_soc_dapm_widget_for_each_sink_path(w, p) {
-- 
2.25.1


  parent reply	other threads:[~2020-08-13 20:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 20:01 [PATCH 00/21] ASoC: Intel: fix cppcheck warnings Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 01/21] ASoC: Intel: Atom: sst-atom-controls: remove redundant assignments Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 02/21] ASoC: Intel: Atom: compress: remove redundant assignment Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 03/21] ASoC: Intel: Atom: platform-pcm: " Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 04/21] ASoC: Intel: Atom: sst: remove useless NULL assignment Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 05/21] ASoC: Intel: Atom: remove redundant initialization Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 06/21] ASoC: Intel: Atom: sst_pvt: " Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 07/21] ASoC: Intel: Atom: platform-pcm: fix redundant return Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 08/21] ASoC: Intel: Atom: remove useless assignment Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 09/21] ASoC: Intel: Atom: sst_loader: remove always-true condition Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 10/21] ASoC: Intel: Atom: sst_pvt: simplify return handling Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 11/21] ASoC: Intel: Atom: (cosmetic) align parameters Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 12/21] ASoC: Intel: Baytrail: (cosmetic) align function parameters Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 13/21] ASoC: Intel: common: " Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 14/21] ASoC: Intel: haswell: " Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 15/21] ASoC: Intel: haswell-ipc: remove redundant assignments Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 16/21] ASoC: Intel: Skylake: skl-nhlt: remove redundant initialization Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 17/21] ASoC: Intel: Skylake: cldma: " Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 18/21] ASoC: Intel: Skylake: sst-utils: remove redundant assignment Pierre-Louis Bossart
2020-08-13 20:01 ` Pierre-Louis Bossart [this message]
2020-08-13 20:01 ` [PATCH 20/21] ASoC: Intel: Skylake: skl-topology: " Pierre-Louis Bossart
2020-08-13 20:01 ` [PATCH 21/21] ASoC: Intel: Skylake: (cosmetic) align function parameters Pierre-Louis Bossart
2020-08-18 16:54 ` [PATCH 00/21] ASoC: Intel: fix cppcheck warnings 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=20200813200147.61990-20-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /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.