Re: [PATCH v6 8/8] reset: gpio: use software nodes to setup the GPIO lookup

From: Andy Shevchenko

Date: Tue Nov 18 2025 - 13:09:18 EST


On Tue, Nov 18, 2025 at 06:08:17PM +0100, Bartosz Golaszewski wrote:
> On Tue, Nov 18, 2025 at 5:44 PM Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> wrote:
> > On Do, 2025-11-06 at 15:32 +0100, Bartosz Golaszewski wrote:

...

> > I'll apply this with the following patch squashed in:
> >
> > diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> > index 3edf04ae8a95..8a7b112a9a77 100644
> > --- a/drivers/reset/core.c
> > +++ b/drivers/reset/core.c
> > @@ -945,7 +945,7 @@ static int __reset_add_reset_gpio_device(const struct of_phandle_args *args)
> > of_node_get(rgpio_dev->of_args.np);
> >
> > rgpio_dev->swnode = fwnode_create_software_node(properties, NULL);
> > - ret = PTR_ERR(rgpio_dev->swnode);
> > + ret = PTR_ERR_OR_ZERO(rgpio_dev->swnode);
> > if (ret)
> > goto err_put_of_node;
>
> Huh? Why?

Hmm... Maybe we need a kernel-doc for fwnode_create_software_node() to be more
explicit on what it might return (and no, NULL is not there, Bart is correct).

--
With Best Regards,
Andy Shevchenko