summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2022-10-18 02:36:49 +0300
committerMark Brown <broonie@kernel.org>2022-10-18 21:16:38 +0300
commit1c9096f32ad23f5867e752f238fd25e4fec55ecd (patch)
treed9d52eb2dce386df565a146fcf64558d49594c36 /sound/soc/intel/avs
parentc1329a0f3bde6a655b9e6ce54b1ce47f46fa49f2 (diff)
downloadlinux-1c9096f32ad23f5867e752f238fd25e4fec55ecd.tar.xz
ASoC: soc-dapm.c: ignore parameter NULL at snd_soc_dapm_free_widget()
Currently snd_soc_dapm_free_widget() is assuming input parameter is non NULL. Thus, caller need to care about it. This patch care it at snd_soc_dapm_free_widget(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wn8yowdr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/avs')
-rw-r--r--sound/soc/intel/avs/pcm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
index 8fe5917b1e26..8037b15cbdcf 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -1016,10 +1016,8 @@ static void avs_component_hda_unregister_dais(struct snd_soc_component *componen
if (!strstr(dai->driver->name, name))
continue;
- if (dai->playback_widget)
- snd_soc_dapm_free_widget(dai->playback_widget);
- if (dai->capture_widget)
- snd_soc_dapm_free_widget(dai->capture_widget);
+ snd_soc_dapm_free_widget(dai->playback_widget);
+ snd_soc_dapm_free_widget(dai->capture_widget);
snd_soc_unregister_dai(dai);
}
}