Re: [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Julia Lawall
On Thu, 31 Aug 2017, Alexandre Belloni wrote: > Hi, > > On 31/08/2017 at 21:08:10 +0200, Christophe JAILLET wrote: > > Le 31/08/2017 à 12:38, Mark Brown a écrit : > > > On Thu, Aug 31, 2017 at 12:31:33PM +0200, Takashi Iwai wrote: > > > > > > > This is again a typical problem by such a trivial f

Re: [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Alexandre Belloni
Hi, On 31/08/2017 at 21:08:10 +0200, Christophe JAILLET wrote: > Le 31/08/2017 à 12:38, Mark Brown a écrit : > > On Thu, Aug 31, 2017 at 12:31:33PM +0200, Takashi Iwai wrote: > > > > > This is again a typical problem by such a trivial fix patch: the code > > > looks as if it were trivial and corr

Re: [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Christophe JAILLET
Le 31/08/2017 à 12:38, Mark Brown a écrit : On Thu, Aug 31, 2017 at 12:31:33PM +0200, Takashi Iwai wrote: This is again a typical problem by such a trivial fix patch: the code looks as if it were trivial and correct, buried in a patch series that easily leads to the oversight by the maintainer'

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Takashi Iwai
On Thu, 31 Aug 2017 12:37:16 +0200, Mark Brown wrote: > > On Thu, Aug 31, 2017 at 12:23:14PM +0200, Takashi Iwai wrote: > > > Ah, wait, now I see your point. It was introduced by the very recent > > patch through Mark's asoc tree (since it was wrongly labeled as "ASoC" > > while it isn't). That

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Mark Brown
On Thu, Aug 31, 2017 at 12:31:33PM +0200, Takashi Iwai wrote: > This is again a typical problem by such a trivial fix patch: the code > looks as if it were trivial and correct, buried in a patch series that > easily leads to the oversight by the maintainer's review. Right, plus the amount of cont

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Mark Brown
On Thu, Aug 31, 2017 at 12:23:14PM +0200, Takashi Iwai wrote: > Ah, wait, now I see your point. It was introduced by the very recent > patch through Mark's asoc tree (since it was wrongly labeled as "ASoC" > while it isn't). That patch looks indeed fishy. The change in > atmel_ac97c_resume() is

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Takashi Iwai
On Thu, 31 Aug 2017 12:19:03 +0200, Mark Brown wrote: > > On Thu, Aug 31, 2017 at 10:10:21AM +0200, Alexandre Belloni wrote: > > > And here is the fallout of the stupid, brainless "fixing" of issues > > reported by static analysis tools. > > > This clk_prepare_enable will never fail. If it was g

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Takashi Iwai
On Thu, 31 Aug 2017 12:13:00 +0200, Takashi Iwai wrote: > > On Thu, 31 Aug 2017 11:56:16 +0200, > Alexandre Belloni wrote: > > > > On 31/08/2017 at 10:23:19 +0200, Julia Lawall wrote: > > > > > > > > > On Thu, 31 Aug 2017, Alexandre Belloni wrote: > > > > > > > On 31/08/2017 at 06:40:42 +0200,

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Alexandre Belloni
On 31/08/2017 at 12:13:00 +0200, Takashi Iwai wrote: > On Thu, 31 Aug 2017 11:56:16 +0200, > Alexandre Belloni wrote: > > > > On 31/08/2017 at 10:23:19 +0200, Julia Lawall wrote: > > > > > > > > > On Thu, 31 Aug 2017, Alexandre Belloni wrote: > > > > > > > On 31/08/2017 at 06:40:42 +0200, Chris

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Mark Brown
On Thu, Aug 31, 2017 at 10:10:21AM +0200, Alexandre Belloni wrote: > And here is the fallout of the stupid, brainless "fixing" of issues > reported by static analysis tools. > This clk_prepare_enable will never fail. If it was going to fail, the > platform would never boot to a point were it is a

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Takashi Iwai
On Thu, 31 Aug 2017 11:56:16 +0200, Alexandre Belloni wrote: > > On 31/08/2017 at 10:23:19 +0200, Julia Lawall wrote: > > > > > > On Thu, 31 Aug 2017, Alexandre Belloni wrote: > > > > > On 31/08/2017 at 06:40:42 +0200, Christophe JAILLET wrote: > > > > If 'clk_prepare_enable()' fails, we must r

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Alexandre Belloni
On 31/08/2017 at 12:38:17 +0300, Andy Shevchenko wrote: > On Thu, 2017-08-31 at 11:35 +0200, Alexandre Belloni wrote: > > On 31/08/2017 at 12:04:03 +0300, Andy Shevchenko wrote: > > > On Thu, 2017-08-31 at 10:23 +0200, Julia Lawall wrote: > > > > > > > > On Thu, 31 Aug 2017, Alexandre Belloni wrot

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Alexandre Belloni
On 31/08/2017 at 10:23:19 +0200, Julia Lawall wrote: > > > On Thu, 31 Aug 2017, Alexandre Belloni wrote: > > > On 31/08/2017 at 06:40:42 +0200, Christophe JAILLET wrote: > > > If 'clk_prepare_enable()' fails, we must release some resources before > > > returning. Add a new label in the existing

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Andy Shevchenko
On Thu, 2017-08-31 at 11:35 +0200, Alexandre Belloni wrote: > On 31/08/2017 at 12:04:03 +0300, Andy Shevchenko wrote: > > On Thu, 2017-08-31 at 10:23 +0200, Julia Lawall wrote: > > > > > > On Thu, 31 Aug 2017, Alexandre Belloni wrote: > > > > > > > On 31/08/2017 at 06:40:42 +0200, Christophe JAIL

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Alexandre Belloni
On 31/08/2017 at 12:04:03 +0300, Andy Shevchenko wrote: > On Thu, 2017-08-31 at 10:23 +0200, Julia Lawall wrote: > > > > On Thu, 31 Aug 2017, Alexandre Belloni wrote: > > > > > On 31/08/2017 at 06:40:42 +0200, Christophe JAILLET wrote: > > > > If 'clk_prepare_enable()' fails, we must release some

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Andy Shevchenko
On Thu, 2017-08-31 at 10:23 +0200, Julia Lawall wrote: > > On Thu, 31 Aug 2017, Alexandre Belloni wrote: > > > On 31/08/2017 at 06:40:42 +0200, Christophe JAILLET wrote: > > > If 'clk_prepare_enable()' fails, we must release some resources > > > before > > > returning. Add a new label in the exis

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Julia Lawall
On Thu, 31 Aug 2017, Alexandre Belloni wrote: > On 31/08/2017 at 06:40:42 +0200, Christophe JAILLET wrote: > > If 'clk_prepare_enable()' fails, we must release some resources before > > returning. Add a new label in the existing error handling path and 'goto' > > there. > > > > Fixes: 260ea95cc0

Re: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-31 Thread Alexandre Belloni
On 31/08/2017 at 06:40:42 +0200, Christophe JAILLET wrote: > If 'clk_prepare_enable()' fails, we must release some resources before > returning. Add a new label in the existing error handling path and 'goto' > there. > > Fixes: 260ea95cc027 ("ASoC: atmel: ac97c: Handle return value of > clk_prepa

[PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

2017-08-30 Thread Christophe JAILLET
If 'clk_prepare_enable()' fails, we must release some resources before returning. Add a new label in the existing error handling path and 'goto' there. Fixes: 260ea95cc027 ("ASoC: atmel: ac97c: Handle return value of clk_prepare_enable.") Signed-off-by: Christophe JAILLET --- sound/atmel/ac97c.