lkml.org 
[lkml]   [2021]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 21/28] leds: lm3697: Make error handling more robust
On Fri, May 28, 2021 at 1:51 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, May 28, 2021 at 12:10:57PM +0200, Pavel Machek wrote:
> > On Mon 2021-05-10 12:50:38, Andy Shevchenko wrote:
> > > It's easy to miss necessary clean up, e.g. firmware node reference counting,
> > > during error path in ->probe(). Make it more robust by moving to a single
> > > point of return.
> > >
> > > Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> >
> > You are now putting the handle even in the success case. Is that
> > right?
>
> Let's put it this way: it's no-op in successful case.
>
> But yeah, I would prefer to have a separate case for error, I'll revisit this.

I have added return 0; for a successful case.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-05-29 11:51    [W:0.095 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site