9 Aug
2022
9 Aug
'22
10:32 a.m.
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