Skip to contentSkip to conversation

ASoC: Intel: skl-hda-dsp-generic: fix itnull.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Oct 25, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Intel: skl-hda-dsp-generic: fix itnull.cocci warnings

From: kbuild test robot <[email protected]>

list_for_each_entry index variables can't be NULL. It necessarily is a structure that contains a list structure.

Generated by: scripts/coccinelle/iterators/itnull.cocci

Fixes 38f9d75bc6ca ("ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi")
CC Kai Vehmanen <[email protected]>

---

url:    https://github.com/0day-ci/linux/commits/Kai-Vehmanen/adapt-SOF-to-use-snd-hda-codec-hdmi/20191025-061501
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

Please take the patch only if it's a positive warning. Thanks!

 skl_hda_dsp_common.c |    3 ---
 1 file changed, 3 deletions(-)
sound/soc/intel/boards/skl_hda_dsp_common.c +0 -3
@@ -143,9 +143,6 @@ int skl_hda_hdmi_jack_init(struct snd_so
 		return skl_hda_hdmi_build_controls(card);
 
 	list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
-		if (!pcm)
-			continue;
-
 		component = pcm->codec_dai->component;
 		snprintf(jack_name, sizeof(jack_name),
 			 "HDMI/DP, pcm=%d Jack", pcm->device);