lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200823191308.GG2588906@lunn.ch>
Date:   Sun, 23 Aug 2020 21:13:08 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Sumera Priyadarsini <sylphrenadin@...il.com>
Cc:     davem@...emloft.net, Julia.Lawall@...6.fr, sean.wang@...iatek.com,
        vivien.didelot@...il.com, f.fainelli@...il.com, kuba@...nel.org,
        matthias.bgg@...il.com, netdev@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] net: dsa: Add of_node_put() before break statement

> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index 8dcb8a49ab67..e81198a65c26 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -1327,6 +1327,7 @@ mt7530_setup(struct dsa_switch *ds)
>  			if (phy_node->parent == priv->dev->of_node->parent) {
>  				ret = of_get_phy_mode(mac_np, &interface);
>  				if (ret && ret != -ENODEV)
> +					of_node_put(mac_np)
>  					return ret;
>  				id = of_mdio_parse_addr(ds->dev, phy_node);
>  				if (id == 0)

You are missing some { }. And a ; . I'm surprised gcc did not warn
you!

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ