ASoC: SOF: imx: Remove error print for devm_add_action_or_reset()

When `devm_add_action_or_reset()` fails, it is due to a failed memory
allocation and will thus return `-ENOMEM`. `dev_err_probe()` doesn't do
anything when error is `-ENOMEM`. Therefore, remove the useless call to
`dev_err_probe()` when `devm_add_action_or_reset()` fails, and just
return the value instead.

Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/pndpldam7tf.a.out@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Waqar Hameed 2025-08-05 11:33:32 +02:00 committed by Mark Brown
parent 8ed2dca4df
commit 9d6a51651f

View File

@ -382,7 +382,7 @@ static int imx_probe(struct snd_sof_dev *sdev)
imx_unregister_action,
sdev);
if (ret)
return dev_err_probe(sdev->dev, ret, "failed to add devm action\n");
return ret;
common->ipc_handle = dev_get_drvdata(&common->ipc_dev->dev);
if (!common->ipc_handle)