diff options
| author | 2026-09-23 15:12:45 +0900 | |
|---|---|---|
| committer | 2026-09-23 14:22:45 +0200 | |
| commit | 3713c74a1b0ad71b416345399d8a706c921cb47f (patch) | |
| tree | a63bd51f2e70eabb84f1a9ed918d1fc621694ad6 /scripts/Makefile.thinlto | |
| parent | ASoC: codecs: rt5514: Fix the pm_ops constant name (diff) | |
ASoC: codecs: cpcap: Fix devm resource leaks across card bind/unbind
The ASoC component .probe/.remove are called on card bind/unbind, but
component->dev is the underlying platform device. Resources requested
with devm_*(component->dev, ...) or request_irq() in the component
.probe are only released when the platform device is removed, not on
card unbind, leaking on every bind/unbind cycle.
The VAUDIO regulator is a pure hardware resource that only depends on
the platform device, so acquire it with devm_regulator_get() in the
platform probe where its devres lifetime matches the device.
The headset/mic-button IRQs genuinely depend on the component, so
keep them in cpcap_soc_probe() but request them with the non-devm
request_irq() API and free them explicitly in cpcap_soc_remove().
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260923061305.4041197-2-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
