Re: [PATCH] ASoC: xtensa: Use dev_err_probe() and drop redundant error handling

From: Mark Brown

Date: Wed Jul 08 2026 - 14:51:02 EST


On Mon, Jul 06, 2026 at 11:57:47AM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> Convert error paths with messages to dev_err_probe(), which combines
> dev_err() and the return statement while also handling -EPROBE_DEFER
> for the clock path.
> Remove the redundant "err:" label and return errors directly. Paths such
> as platform_get_irq() already log failures in the callee, so they simply
> return the error code without printing an additional message. Inline the
> pm_runtime_disable() cleanup at its only call site.

> - if (IS_ERR(i2s->regmap)) {
> - dev_err(&pdev->dev, "regmap init failed\n");
> - err = PTR_ERR(i2s->regmap);
> - goto err;
> - }
> + if (IS_ERR(i2s->regmap))
> + dev_err_probe(&pdev->dev, PTR_ERR(i2s->regmap), "regmap init failed\n");

This isn't returning the error directly, it's ignoring it...

Attachment: signature.asc
Description: PGP signature