Re: [PATCH 5/5] net: dsa: fix a leaked reference by adding missing of_node_put

From: David Miller
Date: Sun Feb 24 2019 - 15:32:35 EST


From: Wen Yang <wen.yang99@xxxxxxxxxx>
Date: Fri, 22 Feb 2019 15:15:42 +0800

> diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
> index 8c431e0..89823f0 100644
> --- a/net/dsa/dsa2.c
> +++ b/net/dsa/dsa2.c
> @@ -613,7 +613,7 @@ static int dsa_switch_parse_ports_of(struct dsa_switch *ds,
> struct device_node *ports, *port;
> struct dsa_port *dp;
> u32 reg;
> - int err;
> + int err = 0;

Please preserve the reverse christmas tree ordering of variables here.

Thank you.