diff options
| author | Cássio Gabriel <cassiogabrielcontato@gmail.com> | 2026-05-14 10:52:35 -0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-05-22 13:30:35 +0100 |
| commit | 5404599c3292a12dfc6a3b604cebb5d51064f553 (patch) | |
| tree | b4adbb705a5c861afa8767e341ee796779765c3e /include/linux/timerqueue.h | |
| parent | 8fbcb4ab267059fedd5e087160cb208b61ab8128 (diff) | |
ASoC: mediatek: mt8189: Fix probe resource cleanup
The MT8189 AFE probe assigns reserved memory with
of_reserved_mem_device_init(), but only releases that assignment from
.remove(). If probe fails after the reserved memory has been assigned,
the assignment record is left behind.
The probe path also uses pm_runtime_get_sync() without checking its
return value. If runtime resume fails, pm_runtime_get_sync() leaves the
usage count incremented and the driver continues initialization without
the device being resumed. Use pm_runtime_resume_and_get() so resume
errors abort probe without leaking a PM usage count.
Finally, component registration failure currently jumps to a label that
drops a runtime PM reference even though the temporary probe reference
was already released. Return the component registration error directly,
and do not drop an unmatched PM reference from .remove().
Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260514-asoc-mt8189-probe-cleanup-v1-1-ded733363281@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
