mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: imx: Remove the use of dev_err_probe()
@ 2025-08-19 11:26 Xichao Zhao
  2025-08-20  7:04 ` Daniel Baluta
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Xichao Zhao @ 2025-08-19 11:26 UTC (permalink / raw)
  To: lgirdwood, peter.ujfalusi, yung-chuan.liao, ranjani.sridharan,
	daniel.baluta, broonie, perex, tiwai, shawnguo, s.hauer
  Cc: kai.vehmanen, pierre-louis.bossart, kernel, festevam,
	linux-sound, imx, linux-kernel, Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 sound/soc/sof/imx/imx-common.c | 4 ++--
 sound/soc/sof/imx/imx8.c       | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c
index f00b381cec3b..4523621cda10 100644
--- a/sound/soc/sof/imx/imx-common.c
+++ b/sound/soc/sof/imx/imx-common.c
@@ -354,8 +354,8 @@ static int imx_probe(struct snd_sof_dev *sdev)
 
 	common = devm_kzalloc(sdev->dev, sizeof(*common), GFP_KERNEL);
 	if (!common)
-		return dev_err_probe(sdev->dev, -ENOMEM,
-				     "failed to allocate common data\n");
+		return -ENOMEM;
+
 	sdev->pdata->hw_pdata = common;
 
 	common->ipc_dev = platform_device_register_data(sdev->dev, "imx-dsp",
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index b73dd91bd529..7e9eab2e3034 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -171,8 +171,7 @@ static int imx8m_probe(struct snd_sof_dev *sdev)
 
 	chip = devm_kzalloc(sdev->dev, sizeof(*chip), GFP_KERNEL);
 	if (!chip)
-		return dev_err_probe(sdev->dev, -ENOMEM,
-				     "failed to allocate chip data\n");
+		return -ENOMEM;
 
 	chip->dap = devm_ioremap(sdev->dev, IMX8M_DAP_DEBUG, IMX8M_DAP_DEBUG_SIZE);
 	if (!chip->dap)
-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-08-25 20:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-19 11:26 [PATCH] ASoC: SOF: imx: Remove the use of dev_err_probe() Xichao Zhao
2025-08-20  7:04 ` Daniel Baluta
2025-08-20  9:24   ` Laurentiu Mihalcea
2025-08-20 17:26     ` Mark Brown
2025-08-20  9:29 ` Laurentiu Mihalcea
2025-08-25 20:04 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®