From 25722cf606f6c58b1f2f709434aeb418c4b0b1ca Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 13 Aug 2020 15:01:45 -0500 Subject: ASoC: Intel: Skylake: skl-topology: remove redundant assignments Cppcheck complains about possible NULL pointer dereferences but the assignments are actually not needed before walking through lists. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/intel/skylake/skl-topology.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/soc/intel/skylake/skl-topology.c') 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) { -- cgit v1.2.3 From 11a790f94b340c3deb893c6229c3948233a91a4a Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 13 Aug 2020 15:01:46 -0500 Subject: ASoC: Intel: Skylake: skl-topology: remove redundant assignment Fix cppcheck warning: sound/soc/intel/skylake/skl-topology.c:2879:29: style: Variable 'block_size' is assigned a value that is never used. [unreadVariable] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/soc/intel/skylake/skl-topology.c') diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 3928a1645820..40bee10b0c65 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -2876,7 +2876,7 @@ static int skl_tplg_get_pvt_data(struct snd_soc_tplg_dapm_widget *tplg_w, struct skl_module_cfg *mconfig) { struct snd_soc_tplg_vendor_array *array; - int num_blocks, block_size = 0, block_type, off = 0; + int num_blocks, block_size, block_type, off = 0; char *data; int ret; -- cgit v1.2.3