summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2022-09-06 02:17:57 +0300
committerMark Brown <broonie@kernel.org>2022-09-07 14:44:31 +0300
commit3caac759681eeb31ac80e3cc14b972680c8bde54 (patch)
tree9c804cd07a2e46c7fcbca86c42e4f2007e0dff87 /tools/perf/scripts/python
parent427de091a7112aa8eaf2f689e95c0dbca5ea6543 (diff)
downloadlinux-3caac759681eeb31ac80e3cc14b972680c8bde54.tar.xz
ASoC: soc-dapm.c: fixup snd_soc_dapm_new_control_unlocked() error handling
Current snd_soc_dapm_new_control_unlocked() error handling is wrong. It is using "goto request_failed" (A), but error message is using "w->name" (B) which is not yet created in such timing. snd_soc_dapm_new_control_unlocked(xxx) { ... switch (w->id) { case xxx: ... if (IS_ERR(...)) { ret = PTR_ERR(...); (A) goto request_failed; } ... } prefix = soc_dapm_prefix(...); if (prefix) (B) w->name = kasprintf(...); else (B) w->name = kstrdup_const(...); ... (A) request_failed: if (ret != -EPROBE_DEFER) (B) dev_err(..., w->name, ...); return ...; } we can create "w->name" at beginning of this function. In such case, we need to call kfree_const(w->name) at error case. This patch do these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wnah8l7e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions