Thread (5 messages) 5 messages, 2 authors, 2021-09-13

Re: [PATCH v2] ASoC: mediatek: common: handle NULL case in suspend/resume function

flat view

From: Mark Brown <broonie@kernel.org>
Date: 2021-09-10 10:24:37
Also in: alsa-devel, linux-mediatek, lkml

On Fri, Sep 10, 2021 at 05:26:13PM +0800, Trevor Wu wrote:
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.
It seems like it'd be better to just allocate the buffer at probe time
and fail in case we can't get it, I'd be surprised if there's many
platforms using this hardware that don't also end up suspending and
resuming.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help