[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1328f773-76c6-4d46-9608-b366303817cb@lunn.ch>
Date: Wed, 29 Nov 2023 21:07:09 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Simon Horman <horms@...nel.org>
Cc: netdev <netdev@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Christian Marangi <ansuelsmth@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH RFC net-next 4/8] dsa: Create port LEDs based on DT
binding
On Wed, Nov 29, 2023 at 07:40:28PM +0000, Simon Horman wrote:
> On Wed, Nov 29, 2023 at 12:21:31AM +0100, Andrew Lunn wrote:
>
> ...
>
> > +static int dsa_port_leds_setup(struct dsa_port *dp)
> > +{
> > + struct device_node *leds, *led;
> > + int err;
> > +
> > + if (!dp->dn)
> > + return 0;
> > +
> > + leds = of_get_child_by_name(dp->dn, "leds");
> > + if (!leds)
> > + return 0;
> > +
> > + for_each_available_child_of_node(leds, led) {
> > + err = dsa_port_led_setup(dp, led);
> > + if (err)
> > + return err;
>
> Hi Andrew,
>
> I realise this is an RFC, but Coccinelle tells me that a call to
> of_node_put() is needed here.
Thanks. If you had not pointed it out, i would probably get it wrong
in the next version as well.
Andrew
Powered by blists - more mailing lists