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

From: Philipp Zabel
Date: Tue Aug 09 2022 - 04:33:14 EST


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