Loading
ASoC: sdw_utils: Check speaker component string allocation
devm_kasprintf() can fail while building the temporary speaker component string. If that happens, spk_components is set to NULL, but the current code can still pass it to strlen() on a later loop iteration or after the loop when appending the speaker component list to card->components. Use NULL to represent the initial "no speaker components" state, and return -ENOMEM immediately if building spk_components fails. Fixes: 0f60ecff ("ASoC: sdw_utils: generate combined spk components string") Signed-off-by:Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260512-asoc-sdw-utils-spk-components-alloc-v1-1-c9bbd6d2e123@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org>