From: Jean-Francois Moine <moinejf@free.fr>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.de>,
Rob Herring <rob.herring@calxeda.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 1/4] ASoc: kirkwood: simplify probe error
Date: Sat, 3 Aug 2013 18:52:55 +0200 [thread overview]
Message-ID: <20130803185255.1b1932c4@armhf> (raw)
In-Reply-To: <20130803124652.GY23006@n2100.arm.linux.org.uk>
On Sat, 3 Aug 2013 13:46:52 +0100
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Wed, Jul 31, 2013 at 08:17:39AM +0200, Jean-Francois Moine wrote:
> > The function kirkwood_i2s_dev_remove() may be used when probe fails.
>
> Looking at this deeper, I'm not happy with this.
[snip]
> What this means is that if snd_soc_register_component() fails, we end
> up calling snd_soc_unregister_component(). This may be fine with the
> way snd_soc_unregister_component() is currently implemented, but you're
> making the assumption that it's fine to call snd_soc_unregister_component()
> for a device which hasn't been registered. Technically, this is a
> layering violation, which makes this change fragile if the behaviour
> of snd_soc_unregister_component() changes in the future.
>
> For the sake of two calls in the error path, I don't think the benefits
> of this patch outweigh the risk.
You are right, but if snd_soc_unregister_component() could be
officially used safely with no previous call to
snd_soc_register_component(), this would simplify error handling in
other drivers too...
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
prev parent reply other threads:[~2013-08-03 16:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-31 6:17 [PATCH v3 1/4] ASoc: kirkwood: simplify probe error Jean-Francois Moine
2013-08-03 12:39 ` Russell King - ARM Linux
2013-08-03 15:55 ` Jean-Francois Moine
2013-08-03 16:10 ` Russell King - ARM Linux
2013-08-03 16:31 ` Mark Brown
2013-08-03 12:46 ` Russell King - ARM Linux
2013-08-03 16:52 ` Jean-Francois Moine [this message]
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=20130803185255.1b1932c4@armhf \
--to=moinejf@free.fr \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=perex@perex.cz \
--cc=rob.herring@calxeda.com \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).