Re: [PATCH v7 01/13] ASoC: qcom: q6apm: move component registration to unmanaged version

From: Mark Brown

Date: Tue Mar 24 2026 - 14:04:47 EST


On Mon, Mar 23, 2026 at 10:38:33PM +0000, Srinivas Kandagatla wrote:

> --- a/sound/soc/qcom/qdsp6/q6apm.c
> +++ b/sound/soc/qcom/qdsp6/q6apm.c
> @@ -747,7 +747,7 @@ static int apm_probe(gpr_device_t *gdev)
>
> q6apm_get_apm_state(apm);
>
> - ret = devm_snd_soc_register_component(dev, &q6apm_audio_component, NULL, 0);
> + ret = snd_soc_register_component(dev, &q6apm_audio_component, NULL, 0);
> if (ret < 0) {
> dev_err(dev, "failed to register q6apm: %d\n", ret);
> return ret;
> @@ -756,6 +756,11 @@ static int apm_probe(gpr_device_t *gdev)
> return of_platform_populate(dev->of_node, NULL, NULL, dev);
> }

Given that of_platform_populate() can fail we now need unwinding for the
component registration here with the removal of devm_

Attachment: signature.asc
Description: PGP signature