lkml.org 
[lkml]   [2017]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH] ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'
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 patch looks indeed fishy. The change in
> > atmel_ac97c_resume() is also bad.
>
> The resume check looks fine? The function appears to do nothing other
> than the clk_prepare_enable().

Well, the patch behaves correctly but the code is ugly:

int ret = clk_prepare_enable(chip->pclk);

return ret;


> > So, I'd prefer reverting the wrong commit instead, and leave some
> > comment about the uselessness of clk_prepare_enable() return value
> > check.
>
> I'd rather keep the error checking there, it means that people don't
> need to open the code and verify it when they go scanning for potential
> problems.

OK.


Takashi

\
 
 \ /
  Last update: 2017-08-31 12:50    [W:0.035 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site