lkml.org 
[lkml]   [2020]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-09-17 16:08    [W:0.026 / U:2.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site