Re: [PATCH v24 08/12] mfd: psci-mfd: Add psci-reboot-mode child cell
[email protected] Mon, 03 Aug 2026 10:07:47 +0000
| Newsgroups | dev.linux.lists.mfd,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Medium] The MFD probe function swallows errors from devm_mfd_add_devices= () instead of propagating them to abort the probe. -- --- Patch [8]: [PATCH v24 08/12] mfd: psci-mfd: Add psci-reboot-mode child = cell --- commit 88cfe078ed8299db3dd71fd877f29ff443d5037e Author: Shivendra Pratap <[email protected]> mfd: psci-mfd: Add psci-reboot-mode child cell =20 This commit exposes the PSCI reboot-mode node as a proper child cell using a named_fwnode. It also registers the psci-cpuidle-domain cell first to isolate it from reboot-mode failures. > diff --git a/drivers/mfd/psci-mfd.c b/drivers/mfd/psci-mfd.c > index 7affd6bb09dd8..7befc4fa86f5d 100644 > --- a/drivers/mfd/psci-mfd.c > +++ b/drivers/mfd/psci-mfd.c [ ... ] > @@ -14,10 +14,35 @@ static const struct mfd_cell psci_cells[] =3D { > static int psci_mfd_probe(struct platform_device *pdev) > { > - return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, psci_cells, > + int ret; > + > + ret =3D devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, psci_cell= s, > ARRAY_SIZE(psci_cells), NULL, 0, NULL); > + if (ret) > + goto out; > + > + ret =3D devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, > + psci_reboot_mode_cell, > + ARRAY_SIZE(psci_reboot_mode_cell), > + NULL, 0, NULL); > + if (ret) { > + if (ret =3D=3D -ENOMEM) > + goto out; > + dev_warn(&pdev->dev, "reboot-mode child cell failed to add: %d\n", ret= ); > + ret =3D 0; > + } [Severity: Medium] Should this propagate the error instead of returning 0? According to the MFD subsystem guidelines, if a child device fails to register during an MFD probe, the entire probe must fail and unwind previously registered children. By setting ret =3D 0 here, the driver repor= ts success for the parent probe even if the reboot-mode child cell fails to register. Does this leave the device in an incomplete state and violate the requirement to propagate devm_mfd_add_devices() errors? > + > +out: > + return ret; > } --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260803-arm-psci-s= [email protected]?part=3D8