]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: SOF: imx: Remove the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 19 Aug 2025 11:26:54 +0000 (19:26 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 24 Aug 2025 21:41:10 +0000 (22:41 +0100)
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>
Reviewed-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Message-ID: <20250819112654.588527-1-zhao.xichao@vivo.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/imx/imx-common.c
sound/soc/sof/imx/imx8.c

index 1757539a6a28339a8f944699813f961c8968054f..40debc541bf9eb217a5a4e16f92a2e8f40670cbd 100644 (file)
@@ -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",
index b73dd91bd5292a39b34222161f088ea17668c84c..7e9eab2e303472ac95b3b4935ff675d2e88dddcb 100644 (file)
@@ -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)