[PATCH v2] ASoC: mediatek: common: handle NULL case in suspend/resume function
Mark Brown
broonie at kernel.org
Fri Sep 10 03:23:58 PDT 2021
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210910/9b37bfd4/attachment.sig>
More information about the linux-arm-kernel
mailing list