[lkml]   [2013]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 1/4] ASoc: kirkwood: simplify probe error
On Sat, 3 Aug 2013 13:46:52 +0100
Russell King - ARM Linux <> 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.
> 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 |
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2013-08-03 19:01    [W:0.039 / U:7.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site