[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190116154439.GA29244@lunn.ch>
Date: Wed, 16 Jan 2019 16:44:39 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
"David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Subject: Re: [PATCH] net: phy: mdio_bus: add missing device_del() in
mdiobus_register() error handling
On Wed, Jan 16, 2019 at 04:18:55PM +0100, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 16 Jan 2019 15:48:29 +0100, Andrew Lunn wrote:
>
> > Reviewed-by: Andrew Lunn <andrew@...n.ch>
> >
> > However, i wounder if it makes sense to add a label before the
> > existing device_del() at the end of the function, and convert this,
> > and the case above into a goto? That might scale better, avoiding the
> > same issue in the future?
>
> That's another option indeed.
>
> Hmm, now that I looked at it, I think we should use device_unregister()
> instead. device_unregister() does both device_del() and put_device().
Hi Thomas
device_unregister() does seem symmetrical with device_register() which
is what we are trying to undo.
Andrew
Powered by blists - more mailing lists