Skip to contentSkip to conversation

ASoC: SOF: mediatek: Fix error code in probe

PATCH In review Dan Carpenter 5 participants 5 messages Jun 15, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: SOF: mediatek: Fix error code in probe

This should return PTR_ERR() instead of IS_ERR().

Fixes e0100bfd383c ("ASoC: SOF: mediatek: Add mt8186 ipc support")
---
 sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/mediatek/mt8186/mt8186.c +1 -1
index 3333a0634e29..e006532caf2f 100644
@@ -392,7 +392,7 @@ static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
 						      PLATFORM_DEVID_NONE,
 						      pdev, sizeof(*pdev));
 	if (IS_ERR(priv->ipc_dev)) {
-		ret = IS_ERR(priv->ipc_dev);
+		ret = PTR_ERR(priv->ipc_dev);
 		dev_err(sdev->dev, "failed to create mtk-adsp-ipc device\n");
 		goto err_adsp_off;
 	}
Signature · 1 line
2.35.1
#1 lore raw

Hi Dan,

Quoted 13 lines · Dan Carpenter

This should return PTR_ERR() instead of IS_ERR().

Fixes e0100bfd383c ("ASoC: SOF: mediatek: Add mt8186 ipc support")
---
 sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/mediatek/mt8186/mt8186.c +0 -0
index 3333a0634e29..e006532caf2f 100644

sound/soc/sof/mediatek/mt8186/mt8186.c static int mt8186_dsp_probe(struct snd_sof_dev *sdev) · line 398

Quoted 8 lines
sound/soc/sof/mediatek/mt8186/mt8186.c +1 -1
@@ -392,7 +392,7 @@ static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
 						      PLATFORM_DEVID_NONE,
 						      pdev, sizeof(*pdev));
 	if (IS_ERR(priv->ipc_dev)) {
-		ret = IS_ERR(priv->ipc_dev);
+		ret = PTR_ERR(priv->ipc_dev);
 		dev_err(sdev->dev, "failed to create mtk-adsp-ipc device\n");
 		goto err_adsp_off;
 	}

Thank you for finding this bug.

Best regards,
TingHan

Acked-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 4 lines · Dan Carpenter

This should return PTR_ERR() instead of IS_ERR().

Fixes e0100bfd383c ("ASoC: SOF: mediatek: Add mt8186 ipc support")

Nice catch, thanks!

Quoted 17 lines
---
 sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/mediatek/mt8186/mt8186.c +1 -1
index 3333a0634e29..e006532caf2f 100644
@@ -392,7 +392,7 @@ static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
 						      PLATFORM_DEVID_NONE,
 						      pdev, sizeof(*pdev));
 	if (IS_ERR(priv->ipc_dev)) {
-		ret = IS_ERR(priv->ipc_dev);
+		ret = PTR_ERR(priv->ipc_dev);
 		dev_err(sdev->dev, "failed to create mtk-adsp-ipc device\n");
 		goto err_adsp_off;
 	}
maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Dan Carpenter
Quoted 1 line · Dan Carpenter

This should return PTR_ERR() instead of IS_ERR().

Quoted 19 lines
Fixes e0100bfd383c ("ASoC: SOF: mediatek: Add mt8186 ipc support")
---
 sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/mediatek/mt8186/mt8186.c +1 -1
index 3333a0634e29..e006532caf2f 100644
@@ -392,7 +392,7 @@ static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
 						      PLATFORM_DEVID_NONE,
 						      pdev, sizeof(*pdev));
 	if (IS_ERR(priv->ipc_dev)) {
-		ret = IS_ERR(priv->ipc_dev);
+		ret = PTR_ERR(priv->ipc_dev);
 		dev_err(sdev->dev, "failed to create mtk-adsp-ipc device\n");
 		goto err_adsp_off;
 	}
Signature · 1 line
Péter
maintainer
#4 lore raw
In reply to Dan Carpenter
Quoted 3 lines · Dan Carpenter

This should return PTR_ERR() instead of IS_ERR().

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: mediatek: Fix error code in probe

      commit: 62257638170eee07926c9df5a4c9059ec69a3734

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark