summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorChancel Liu <chancel.liu@nxp.com>2026-09-13 19:15:30 +0900
committerMark Brown <broonie@kernel.org>2026-09-14 14:57:28 +0100
commit115a5655bcbbcc79536c00fe07a5ffeffb3ac296 (patch)
treecdf7fc3259321c040cd0f2cc85c56e80a3ed6e74 /tools/perf/scripts/python
parent3efb5b99f642736d132c10d368e6a9818dfd0bd8 (diff)
ASoC: cs42l52: Fix beep input device leak on card re-bind
cs42l52 allocates its beep input device with devm_input_allocate_device() from the ASoC component probe, but the associated devres cleanup is tied to the underlying I2C device, while cs42l52_free_beep() on the component remove path only clears the cs42l52->beep pointer. The input device is only leaked when the sound card is unregistered and re-registered while the I2C device stays bound. On that path the component probe runs again and allocates and registers a new input device every time, leaking the previous one and its sysfs/input node. Allocate the beep device with input_allocate_device() and pair it with the component lifecycle: input_free_device() on registration failure and input_unregister_device() in cs42l52_free_beep(). Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20260913101531.2787654-6-chancel.liu@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions