diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2022-10-19 00:36:21 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-10-19 13:05:28 +0100 |
commit | c196b412314fef9516af9bc1141e631af15e308f (patch) | |
tree | c5d69d3066d291a0ff5389e8696f6359d345afd9 /sound/soc/soc-dapm.c | |
parent | ASoC: soc-dapm.c: remove no meaning variable from snd_soc_dapm_add_path() (diff) | |
download | wireguard-linux-c196b412314fef9516af9bc1141e631af15e308f.tar.xz wireguard-linux-c196b412314fef9516af9bc1141e631af15e308f.zip |
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>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/875yggtzsq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index f9c4fd11853c..5280a1aafb92 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2489,6 +2489,9 @@ void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w) struct snd_soc_dapm_path *p, *next_p; enum snd_soc_dapm_direction dir; + if (!w) + return; + list_del(&w->list); list_del(&w->dirty); /* |