[PATCH 2/3] ASoC: apple: mca: Start new platform driver

Philipp Zabel p.zabel at pengutronix.de
Tue Aug 9 10:32:45 CEST 2022


Hi Martin,

On Di, 2022-08-09 at 00:41 +0200, Martin Povišer wrote:
> +	mca->rstc = devm_reset_control_get_shared(&pdev->dev, NULL);
> +	if (IS_ERR(mca->rstc)) {
> +		dev_dbg(&pdev->dev, "couldn't obtain reset control: %pe\n", mca->rstc);
> +		mca->rstc = NULL;
> +	}

Please don't ignore errors, this could be -ENOMEM.

For optional resets, use devm_reset_control_get_optional_shared(),
which returns NULL if there is no resets property in the device tree.

regards
Philipp


More information about the Alsa-devel mailing list