Re: [PATCH v6 1/7] reset: mpfs: add non-auxiliary bus probing

Conor Dooley
2025-10-31T10:58:34Z

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

On Fri, Oct 31, 2025 at 09:20:17AM +0200, claudiu beznea wrote:
> On 10/29/25 18:11, Conor Dooley wrote:
> > -static int mpfs_reset_probe(struct auxiliary_device *adev,
> > - const struct auxiliary_device_id *id)
> > +static int mpfs_reset_mfd_probe(struct platform_device *pdev)
> > {
> > - struct device *dev = &adev->dev;
> > struct reset_controller_dev *rcdev;
> > + struct device *dev = &pdev->dev;
> > + struct mpfs_reset *rst;
> > +
> > + rst = devm_kzalloc(dev, sizeof(*rst), GFP_KERNEL);
> > + if (!rst)
> > + return -ENOMEM;
> > +
> > + rcdev = &rst->rcdev;
> > + rcdev->dev = dev;
> > + rcdev->ops = &mpfs_reset_ops;
> > +
> > + rcdev->of_node = pdev->dev.parent->of_node;
> > + rcdev->of_reset_n_cells = 1;
> > + rcdev->of_xlate = mpfs_reset_xlate;
> > + rcdev->nr_resets = MPFS_NUM_RESETS;
> > +
> > + rst->regmap = device_node_to_regmap(pdev->dev.parent->of_node);
> > + if (IS_ERR(rst->regmap))
> > + dev_err_probe(dev, PTR_ERR(rst->regmap), "Failed to find syscon regmap\n");
>
> Do you want to continue registering the reset controller here? rcdev->base
> is NULL, thus the reset controller ops will fail, if I'm not wrong.

Oh, good point. That line is missing a return.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]