Re: [PATCH] ASoC: tegra: Add error logging for probe and callback failures

From: Mark Brown

Date: Wed Mar 18 2026 - 08:25:51 EST


On Wed, Mar 18, 2026 at 09:46:31AM +0000, Sheetal wrote:
> Add dev_err_probe() and dev_err() logging across probe and runtime
> error paths in Tegra audio drivers to improve debuggability.
> Use dev_err_probe() only where -EPROBE_DEFER can be returned.

It's probably better to just use it as a defensive measure in case the
APIs change for the ones that are in the probe path. It's easier than
figuring out if the API that's being called could defer.

> regs = devm_platform_ioremap_resource(pdev, 0);
> - if (IS_ERR(regs))
> + if (IS_ERR(regs)) {
> + dev_err(dev, "failed to map registers\n");
> return PTR_ERR(regs);
> + }

If you're going to log the error message it's helpful to include the
error code, though IIRC in this case errors are already logged by the
API so there's no need to log anything at all.

Attachment: signature.asc
Description: PGP signature