[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160116171149.GA9880@lunn.ch>
Date: Sat, 16 Jan 2016 18:11:49 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Teresa Remmet <t.remmet@...tec.de>
Cc: netdev@...r.kernel.org, Florian Fainelli <f.fainelli@...il.com>,
linux-kernel@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode
> +static void smsc_phy_remove(struct phy_device *phydev)
> +{
> + struct device *dev = &phydev->mdio.dev;
> + bool *priv = phydev->priv;
> +
> + if (priv)
> + devm_kfree(dev, priv);
> +}
Not needed, since this is the devm_ API.
>From a stylistic point of view, it might be better to define a
structure with a single member. It is what people expect a priv to be.
It keeps the maintenance burden lower if you do things in the normal
way.
Andrew
Powered by blists - more mailing lists