* [PATCH 0/6] ASoC: sunxi: Simplify error handling
@ 2026-07-15 9:55 phucduc.bui
2026-07-15 9:55 ` [PATCH 1/6] ASoC: sunxi: sun4i-codec: Use dev_err_probe() for probe " phucduc.bui
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: phucduc.bui @ 2026-07-15 9:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Charles Keepax, Kuninori Morimoto,
Chen Ni, Marcus Cooper, Bjorn Helgaas, Danilo Krummrich,
u.kleine-koenig, linux-sunxi, linux-kernel, linux-arm-kernel,
linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
This series improves probe error handling in the sunxi ASoC drivers.
It replaces suitable probe error paths with dev_err_probe() to
simplify the code and handle deferred probe errors consistently.
It also removes redundant error messages where the called helpers
already report failures, avoiding duplicate log messages.
Build tested only.
Besst regards,
Phuc
bui duc phuc (6):
ASoC: sunxi: sun4i-codec: Use dev_err_probe() for probe error handling
ASoC: sunxi: sun4i-codec: Drop redundant error messages
ASoC: sunxi: sun4i-i2s: Use dev_err_probe() for probe error handling
ASoC: sunxi: sun4i-spdif: Use dev_err_probe() for probe error handling
ASoC: sunxi: sun50i-codec-analog: Improve probe error handling
ASoC: sunxi: sun8i-codec-analog: Improve probe error handling
sound/soc/sunxi/sun4i-codec.c | 89 ++++++++++-----------------
sound/soc/sunxi/sun4i-i2s.c | 28 ++++-----
sound/soc/sunxi/sun4i-spdif.c | 23 +++----
sound/soc/sunxi/sun50i-codec-analog.c | 11 ++--
sound/soc/sunxi/sun8i-codec-analog.c | 11 ++--
5 files changed, 63 insertions(+), 99 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/6] ASoC: sunxi: sun4i-codec: Use dev_err_probe() for probe error handling
2026-07-15 9:55 [PATCH 0/6] ASoC: sunxi: Simplify error handling phucduc.bui
@ 2026-07-15 9:55 ` phucduc.bui
2026-07-15 9:55 ` [PATCH 2/6] ASoC: sunxi: sun4i-codec: Drop redundant error messages phucduc.bui
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: phucduc.bui @ 2026-07-15 9:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Charles Keepax, Kuninori Morimoto,
Chen Ni, Marcus Cooper, Bjorn Helgaas, Danilo Krummrich,
u.kleine-koenig, linux-sunxi, linux-kernel, linux-arm-kernel,
linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Use dev_err_probe() for probe error handling to simplify the error paths
and handle -EPROBE_DEFER correctly.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/sunxi/sun4i-codec.c | 70 ++++++++++++++---------------------
1 file changed, 28 insertions(+), 42 deletions(-)
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index f4e22af594fa..05308df3ae5b 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -2316,67 +2316,54 @@ static int sun4i_codec_probe(struct platform_device *pdev)
scodec->regmap = devm_regmap_init_mmio(&pdev->dev, base,
quirks->regmap_config);
- if (IS_ERR(scodec->regmap)) {
- dev_err(&pdev->dev, "Failed to create our regmap\n");
- return PTR_ERR(scodec->regmap);
- }
+ if (IS_ERR(scodec->regmap))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->regmap),
+ "Failed to create our regmap\n");
/* Get the clocks from the DT */
scodec->clk_apb = devm_clk_get_enabled(&pdev->dev, "apb");
- if (IS_ERR(scodec->clk_apb)) {
- dev_err(&pdev->dev, "Failed to get the APB clock\n");
- return PTR_ERR(scodec->clk_apb);
- }
+ if (IS_ERR(scodec->clk_apb))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->clk_apb),
+ "Failed to get the APB clock\n");
scodec->clk_module = devm_clk_get(&pdev->dev, "codec");
- if (IS_ERR(scodec->clk_module)) {
- dev_err(&pdev->dev, "Failed to get the module clock\n");
- return PTR_ERR(scodec->clk_module);
- }
+ if (IS_ERR(scodec->clk_module))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->clk_module),
+ "Failed to get the module clock\n");
if (quirks->has_reset) {
scodec->rst = devm_reset_control_get_exclusive_deasserted(&pdev->dev, NULL);
- if (IS_ERR(scodec->rst)) {
- dev_err(&pdev->dev, "Failed to get reset control\n");
- return PTR_ERR(scodec->rst);
- }
+ if (IS_ERR(scodec->rst))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->rst),
+ "Failed to get reset control\n");
}
scodec->gpio_pa = devm_gpiod_get_optional(&pdev->dev, "allwinner,pa",
GPIOD_OUT_LOW);
- if (IS_ERR(scodec->gpio_pa)) {
- ret = PTR_ERR(scodec->gpio_pa);
- dev_err_probe(&pdev->dev, ret, "Failed to get pa gpio\n");
- return ret;
- }
+ if (IS_ERR(scodec->gpio_pa))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->gpio_pa),
+ "Failed to get pa gpio\n");
+
scodec->gpio_hp = devm_gpiod_get_optional(&pdev->dev, "hp-det", GPIOD_IN);
- if (IS_ERR(scodec->gpio_hp)) {
- ret = PTR_ERR(scodec->gpio_hp);
- dev_err_probe(&pdev->dev, ret, "Failed to get hp-det gpio\n");
- return ret;
- }
+ if (IS_ERR(scodec->gpio_hp))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->gpio_hp),
+ "Failed to get hp-det gpio\n");
/* reg_field setup */
scodec->reg_adc_fifoc = devm_regmap_field_alloc(&pdev->dev,
scodec->regmap,
quirks->reg_adc_fifoc);
- if (IS_ERR(scodec->reg_adc_fifoc)) {
- ret = PTR_ERR(scodec->reg_adc_fifoc);
- dev_err(&pdev->dev, "Failed to create regmap fields: %d\n",
- ret);
- return ret;
- }
+ if (IS_ERR(scodec->reg_adc_fifoc))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->reg_adc_fifoc),
+ "Failed to create regmap fields\n");
scodec->reg_dac_fifoc = devm_regmap_field_alloc(&pdev->dev,
scodec->regmap,
quirks->reg_dac_fifoc);
- if (IS_ERR(scodec->reg_dac_fifoc)) {
- ret = PTR_ERR(scodec->reg_dac_fifoc);
- dev_err(&pdev->dev, "Failed to create regmap fields: %d\n",
- ret);
- return ret;
- }
+ if (IS_ERR(scodec->reg_dac_fifoc))
+ return dev_err_probe(&pdev->dev, PTR_ERR(scodec->reg_dac_fifoc),
+ "Failed to create regmap fields\n");
/* DMA configuration for TX FIFO */
scodec->playback_dma_data.addr = res->start + quirks->reg_dac_txdata;
@@ -2422,10 +2409,9 @@ static int sun4i_codec_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, scodec);
ret = snd_soc_register_card(card);
- if (ret) {
- dev_err_probe(&pdev->dev, ret, "Failed to register our card\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret,
+ "Failed to register our card\n");
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/6] ASoC: sunxi: sun4i-codec: Drop redundant error messages
2026-07-15 9:55 [PATCH 0/6] ASoC: sunxi: Simplify error handling phucduc.bui
2026-07-15 9:55 ` [PATCH 1/6] ASoC: sunxi: sun4i-codec: Use dev_err_probe() for probe " phucduc.bui
@ 2026-07-15 9:55 ` phucduc.bui
2026-07-15 9:55 ` [PATCH 3/6] ASoC: sunxi: sun4i-i2s: Use dev_err_probe() for probe error handling phucduc.bui
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: phucduc.bui @ 2026-07-15 9:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Charles Keepax, Kuninori Morimoto,
Chen Ni, Marcus Cooper, Bjorn Helgaas, Danilo Krummrich,
u.kleine-koenig, linux-sunxi, linux-kernel, linux-arm-kernel,
linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
The called functions already log failures where appropriate. Return the
original error directly and avoid duplicate error messages.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/sunxi/sun4i-codec.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 05308df3ae5b..71f7a1fedd88 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -2380,31 +2380,22 @@ static int sun4i_codec_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev, quirks->codec,
&sun4i_codec_dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register our codec\n");
+ if (ret)
return ret;
- }
ret = devm_snd_soc_register_component(&pdev->dev,
&sun4i_codec_component,
&dummy_cpu_dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register our DAI\n");
+ if (ret)
return ret;
- }
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register against DMAEngine\n");
+ if (ret)
return ret;
- }
card = quirks->create_card(&pdev->dev);
- if (IS_ERR(card)) {
- ret = PTR_ERR(card);
- dev_err(&pdev->dev, "Failed to create our card\n");
- return ret;
- }
+ if (IS_ERR(card))
+ return PTR_ERR(card);
snd_soc_card_set_drvdata(card, scodec);
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/6] ASoC: sunxi: sun4i-i2s: Use dev_err_probe() for probe error handling
2026-07-15 9:55 [PATCH 0/6] ASoC: sunxi: Simplify error handling phucduc.bui
2026-07-15 9:55 ` [PATCH 1/6] ASoC: sunxi: sun4i-codec: Use dev_err_probe() for probe " phucduc.bui
2026-07-15 9:55 ` [PATCH 2/6] ASoC: sunxi: sun4i-codec: Drop redundant error messages phucduc.bui
@ 2026-07-15 9:55 ` phucduc.bui
2026-07-15 9:55 ` [PATCH 4/6] ASoC: sunxi: sun4i-spdif: " phucduc.bui
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: phucduc.bui @ 2026-07-15 9:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Charles Keepax, Kuninori Morimoto,
Chen Ni, Marcus Cooper, Bjorn Helgaas, Danilo Krummrich,
u.kleine-koenig, linux-sunxi, linux-kernel, linux-arm-kernel,
linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Use dev_err_probe() for probe error handling to simplify the error paths
and handle -EPROBE_DEFER correctly.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/sunxi/sun4i-i2s.c | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
index 40de99a34bc3..716fa4d872ff 100644
--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -1550,30 +1550,26 @@ static int sun4i_i2s_probe(struct platform_device *pdev)
}
i2s->bus_clk = devm_clk_get(&pdev->dev, "apb");
- if (IS_ERR(i2s->bus_clk)) {
- dev_err(&pdev->dev, "Can't get our bus clock\n");
- return PTR_ERR(i2s->bus_clk);
- }
+ if (IS_ERR(i2s->bus_clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(i2s->bus_clk),
+ "Can't get our bus clock\n");
i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
i2s->variant->sun4i_i2s_regmap);
- if (IS_ERR(i2s->regmap)) {
- dev_err(&pdev->dev, "Regmap initialisation failed\n");
- return PTR_ERR(i2s->regmap);
- }
+ if (IS_ERR(i2s->regmap))
+ return dev_err_probe(&pdev->dev, PTR_ERR(i2s->regmap),
+ "Regmap initialisation failed\n");
i2s->mod_clk = devm_clk_get(&pdev->dev, "mod");
- if (IS_ERR(i2s->mod_clk)) {
- dev_err(&pdev->dev, "Can't get our mod clock\n");
- return PTR_ERR(i2s->mod_clk);
- }
+ if (IS_ERR(i2s->mod_clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(i2s->mod_clk),
+ "Can't get our mod clock\n");
if (i2s->variant->has_reset) {
i2s->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
- if (IS_ERR(i2s->rst)) {
- dev_err(&pdev->dev, "Failed to get reset control\n");
- return PTR_ERR(i2s->rst);
- }
+ if (IS_ERR(i2s->rst))
+ return dev_err_probe(&pdev->dev, PTR_ERR(i2s->rst),
+ "Failed to get reset control\n");
}
if (!IS_ERR(i2s->rst)) {
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/6] ASoC: sunxi: sun4i-spdif: Use dev_err_probe() for probe error handling
2026-07-15 9:55 [PATCH 0/6] ASoC: sunxi: Simplify error handling phucduc.bui
` (2 preceding siblings ...)
2026-07-15 9:55 ` [PATCH 3/6] ASoC: sunxi: sun4i-i2s: Use dev_err_probe() for probe error handling phucduc.bui
@ 2026-07-15 9:55 ` phucduc.bui
2026-07-15 9:55 ` [PATCH 5/6] ASoC: sunxi: sun50i-codec-analog: Improve " phucduc.bui
2026-07-15 9:55 ` [PATCH 6/6] ASoC: sunxi: sun8i-codec-analog: " phucduc.bui
5 siblings, 0 replies; 7+ messages in thread
From: phucduc.bui @ 2026-07-15 9:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Charles Keepax, Kuninori Morimoto,
Chen Ni, Marcus Cooper, Bjorn Helgaas, Danilo Krummrich,
u.kleine-koenig, linux-sunxi, linux-kernel, linux-arm-kernel,
linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Use dev_err_probe() for probe error handling to simplify the error paths
and handle -EPROBE_DEFER correctly.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/sunxi/sun4i-spdif.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index c2ec19437cd7..d979bb00312f 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -684,26 +684,23 @@ static int sun4i_spdif_probe(struct platform_device *pdev)
host->regmap = devm_regmap_init_mmio(&pdev->dev, base,
&sun4i_spdif_regmap_config);
- if (IS_ERR(host->regmap)) {
- dev_err(&pdev->dev, "failed to initialise regmap.\n");
- return PTR_ERR(host->regmap);
- }
+ if (IS_ERR(host->regmap))
+ return dev_err_probe(&pdev->dev, PTR_ERR(host->regmap),
+ "failed to initialise regmap.\n");
/* Clocks */
host->apb_clk = devm_clk_get(&pdev->dev, "apb");
- if (IS_ERR(host->apb_clk)) {
- dev_err(&pdev->dev, "failed to get a apb clock.\n");
- return PTR_ERR(host->apb_clk);
- }
+ if (IS_ERR(host->apb_clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(host->apb_clk),
+ "failed to get a apb clock.\n");
if (quirks->tx_clk_name)
tx_clk_name = quirks->tx_clk_name;
host->spdif_clk = devm_clk_get(&pdev->dev, tx_clk_name);
- if (IS_ERR(host->spdif_clk)) {
- dev_err(&pdev->dev, "failed to get the \"%s\" clock.\n",
- tx_clk_name);
- return PTR_ERR(host->spdif_clk);
- }
+ if (IS_ERR(host->spdif_clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(host->spdif_clk),
+ "failed to get the \"%s\" clock.\n",
+ tx_clk_name);
host->dma_params_tx.addr = res->start + quirks->reg_dac_txdata;
host->dma_params_tx.maxburst = 8;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/6] ASoC: sunxi: sun50i-codec-analog: Improve probe error handling
2026-07-15 9:55 [PATCH 0/6] ASoC: sunxi: Simplify error handling phucduc.bui
` (3 preceding siblings ...)
2026-07-15 9:55 ` [PATCH 4/6] ASoC: sunxi: sun4i-spdif: " phucduc.bui
@ 2026-07-15 9:55 ` phucduc.bui
2026-07-15 9:55 ` [PATCH 6/6] ASoC: sunxi: sun8i-codec-analog: " phucduc.bui
5 siblings, 0 replies; 7+ messages in thread
From: phucduc.bui @ 2026-07-15 9:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Charles Keepax, Kuninori Morimoto,
Chen Ni, Marcus Cooper, Bjorn Helgaas, Danilo Krummrich,
u.kleine-koenig, linux-sunxi, linux-kernel, linux-arm-kernel,
linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Drop the redundant error message after devm_platform_ioremap_resource(),
which already reports failures, and use dev_err_probe() for regmap
initialization errors.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/sunxi/sun50i-codec-analog.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/sound/soc/sunxi/sun50i-codec-analog.c b/sound/soc/sunxi/sun50i-codec-analog.c
index 9f5b067a8ccc..50c0dee8c433 100644
--- a/sound/soc/sunxi/sun50i-codec-analog.c
+++ b/sound/soc/sunxi/sun50i-codec-analog.c
@@ -551,16 +551,13 @@ static int sun50i_codec_analog_probe(struct platform_device *pdev)
bool enable;
base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(base)) {
- dev_err(&pdev->dev, "Failed to map the registers\n");
+ if (IS_ERR(base))
return PTR_ERR(base);
- }
regmap = sun8i_adda_pr_regmap_init(&pdev->dev, base);
- if (IS_ERR(regmap)) {
- dev_err(&pdev->dev, "Failed to create regmap\n");
- return PTR_ERR(regmap);
- }
+ if (IS_ERR(regmap))
+ return dev_err_probe(&pdev->dev, PTR_ERR(regmap),
+ "Failed to create regmap\n");
enable = device_property_read_bool(&pdev->dev,
"allwinner,internal-bias-resistor");
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 6/6] ASoC: sunxi: sun8i-codec-analog: Improve probe error handling
2026-07-15 9:55 [PATCH 0/6] ASoC: sunxi: Simplify error handling phucduc.bui
` (4 preceding siblings ...)
2026-07-15 9:55 ` [PATCH 5/6] ASoC: sunxi: sun50i-codec-analog: Improve " phucduc.bui
@ 2026-07-15 9:55 ` phucduc.bui
5 siblings, 0 replies; 7+ messages in thread
From: phucduc.bui @ 2026-07-15 9:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Charles Keepax, Kuninori Morimoto,
Chen Ni, Marcus Cooper, Bjorn Helgaas, Danilo Krummrich,
u.kleine-koenig, linux-sunxi, linux-kernel, linux-arm-kernel,
linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Drop the redundant error message after devm_platform_ioremap_resource(),
which already reports failures, and use dev_err_probe() for regmap
initialization errors.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/sunxi/sun8i-codec-analog.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c
index 2024e2b2553e..3335855c6311 100644
--- a/sound/soc/sunxi/sun8i-codec-analog.c
+++ b/sound/soc/sunxi/sun8i-codec-analog.c
@@ -822,16 +822,13 @@ static int sun8i_codec_analog_probe(struct platform_device *pdev)
void __iomem *base;
base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(base)) {
- dev_err(&pdev->dev, "Failed to map the registers\n");
+ if (IS_ERR(base))
return PTR_ERR(base);
- }
regmap = sun8i_adda_pr_regmap_init(&pdev->dev, base);
- if (IS_ERR(regmap)) {
- dev_err(&pdev->dev, "Failed to create regmap\n");
- return PTR_ERR(regmap);
- }
+ if (IS_ERR(regmap))
+ return dev_err_probe(&pdev->dev, PTR_ERR(regmap),
+ "Failed to create regmap\n");
return devm_snd_soc_register_component(&pdev->dev,
&sun8i_codec_analog_cmpnt_drv,
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-07-15 9:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 9:55 [PATCH 0/6] ASoC: sunxi: Simplify error handling phucduc.bui
2026-07-15 9:55 ` [PATCH 1/6] ASoC: sunxi: sun4i-codec: Use dev_err_probe() for probe " phucduc.bui
2026-07-15 9:55 ` [PATCH 2/6] ASoC: sunxi: sun4i-codec: Drop redundant error messages phucduc.bui
2026-07-15 9:55 ` [PATCH 3/6] ASoC: sunxi: sun4i-i2s: Use dev_err_probe() for probe error handling phucduc.bui
2026-07-15 9:55 ` [PATCH 4/6] ASoC: sunxi: sun4i-spdif: " phucduc.bui
2026-07-15 9:55 ` [PATCH 5/6] ASoC: sunxi: sun50i-codec-analog: Improve " phucduc.bui
2026-07-15 9:55 ` [PATCH 6/6] ASoC: sunxi: sun8i-codec-analog: " phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox