Skip to content
Unverified Commit 1dd03852 authored by Trevor Wu's avatar Trevor Wu Committed by Mark Brown
Browse files

ASoC: mediatek: common: handle NULL case in suspend/resume function

When memory allocation for afe->reg_back_up fails, reg_back_up can't
be used.
Keep the suspend/resume flow but skip register backup when
afe->reg_back_up is NULL, in case illegal memory access happens.

Fixes: 283b6124

 ("ASoC: mediatek: implement mediatek common structure")
Signed-off-by: default avatarTrevor Wu <trevor.wu@mediatek.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210910092613.30188-1-trevor.wu@mediatek.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 26be23af
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment