diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2022-10-17 23:36:49 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-10-18 19:16:38 +0100 |
commit | 1c9096f32ad23f5867e752f238fd25e4fec55ecd (patch) | |
tree | d9d52eb2dce386df565a146fcf64558d49594c36 /sound/soc/soc-dapm.c | |
parent | c1329a0f3bde6a655b9e6ce54b1ce47f46fa49f2 (diff) | |
download | lwn-1c9096f32ad23f5867e752f238fd25e4fec55ecd.tar.gz lwn-1c9096f32ad23f5867e752f238fd25e4fec55ecd.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>
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/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); /* |