[PATCH 1/5] ASoC: kirkwood: kirkwood-i2s: Fix error handling for resource mapping
From: phucduc . bui
Date: Mon Oct 26 2026 - 07:06:24 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
Return the actual error code from devm_platform_ioremap_resource_byname()
instead of always returning -ENOMEM when resource mapping fails.
This preserves the original error code, allowing callers to identify
the actual cause of the failure.
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/kirkwood/kirkwood-i2s.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 739a819d8494..cf4327101b96 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -59,11 +59,11 @@ static int armada_38x_i2s_init_quirk(struct platform_device *pdev,
priv->pll_config = devm_platform_ioremap_resource_byname(pdev, "pll_regs");
if (IS_ERR(priv->pll_config))
- return -ENOMEM;
+ return PTR_ERR(priv->pll_config);
priv->soc_control = devm_platform_ioremap_resource_byname(pdev, "soc_ctrl");
if (IS_ERR(priv->soc_control))
- return -ENOMEM;
+ return PTR_ERR(priv->soc_control);
/* Select one of exceptive modes: I2S or S/PDIF */
reg_val = readl(priv->soc_control);
--
2.43.0