From: Andrew Lunn <andrew@lunn.ch>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Subject: Re: [PATCH] net: phy: mdio_bus: add missing device_del() in mdiobus_register() error handling
Date: Wed, 16 Jan 2019 15:48:29 +0100 [thread overview]
Message-ID: <20190116144829.GC25731@lunn.ch> (raw)
In-Reply-To: <20190116095358.28354-1-thomas.petazzoni@bootlin.com>
> The actual error that we had from devm_gpiod_get_optional() was
> -EPROBE_DEFER, due to the GPIO being provided by a driver that is
> probed later than the Ethernet controller driver.
>
> To fix this, we simply add the missing device_del() invocation in the
> error path.
Hi Thomas
Reviewed-by: Andrew Lunn <andrew@lunn.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?
Thanks
Andrew
next prev parent reply other threads:[~2019-01-16 14:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 9:53 [PATCH] net: phy: mdio_bus: add missing device_del() in mdiobus_register() error handling Thomas Petazzoni
2019-01-16 14:48 ` Andrew Lunn [this message]
2019-01-16 15:18 ` Thomas Petazzoni
2019-01-16 15:44 ` Andrew Lunn
2019-02-11 14:31 ` Thomas Petazzoni
2019-02-15 1:23 ` Andrew Lunn
2019-01-18 19:08 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190116144829.GC25731@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul.kocialkowski@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.