diff options
| author | Tuo Li <islituo@gmail.com> | 2026-05-28 09:41:06 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-08 21:02:00 +0300 |
| commit | b8948ac26efc395264a47f9a743889065adb5cff (patch) | |
| tree | c3f502ed596c96df4092710a0b46996c7ec82a5d /include/linux/timerqueue.h | |
| parent | 2592387f026b618acffd795bc7c5592485b5f6f0 (diff) | |
| download | linux-b8948ac26efc395264a47f9a743889065adb5cff.tar.xz | |
ASoC: mediatek: mt8365-afe-pcm: fix possible NULL-pointer dereferences in mt8365_afe_suspend()
mt8365_afe_suspend() allocates the register backup buffer with
devm_kcalloc(), but does not check for allocation failure before using the
returned pointer. This may lead to a NULL pointer dereference when
accessing afe->reg_back_up[i].
Add the missing NULL check and return -ENOMEM on allocation failure after
disabling the main clock.
Also propagate the return value of mt8365_afe_suspend() in
mt8365_afe_dev_runtime_suspend() so that the suspended state is not updated
when suspend fails.
Signed-off-by: Tuo Li <islituo@gmail.com>
Link: https://patch.msgid.link/20260528064107.470824-1-islituo@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
