diff mbox series

ASoC: SOF: sof-audio: remove useless assignment

Message ID 20220421162600.302230-1-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit d516e96bdeca103224de2f84685bf733953b6303
Headers show
Series ASoC: SOF: sof-audio: remove useless assignment | expand

Commit Message

Pierre-Louis Bossart April 21, 2022, 4:26 p.m. UTC
There is no need to assign spcm to NULL. Removing this assignment also
removes a false alarm reported by cppcheck.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/sof/sof-audio.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown April 22, 2022, 11:17 p.m. UTC | #1
On Thu, 21 Apr 2022 11:26:00 -0500, Pierre-Louis Bossart wrote:
> There is no need to assign spcm to NULL. Removing this assignment also
> removes a false alarm reported by cppcheck.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: sof-audio: remove useless assignment
      commit: d516e96bdeca103224de2f84685bf733953b6303

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 0898f4dbe29f8..a0af7c421fd9b 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -404,8 +404,7 @@  struct snd_sof_pcm *snd_sof_find_spcm_dai(struct snd_soc_component *scomp,
 					  struct snd_soc_pcm_runtime *rtd)
 {
 	struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
-
-	struct snd_sof_pcm *spcm = NULL;
+	struct snd_sof_pcm *spcm;
 
 	list_for_each_entry(spcm, &sdev->pcm_list, list) {
 		if (le32_to_cpu(spcm->pcm.dai_id) == rtd->dai_link->id)