summaryrefslogtreecommitdiff
path: root/rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorTuo Li <islituo@gmail.com>2026-05-28 14:41:06 +0800
committerMark Brown <broonie@kernel.org>2026-06-08 19:02:00 +0100
commitb8948ac26efc395264a47f9a743889065adb5cff (patch)
treec3f502ed596c96df4092710a0b46996c7ec82a5d /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
parent2592387f026b618acffd795bc7c5592485b5f6f0 (diff)
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 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions