Re: [PATCH] leds: lm3692x: Return 0 from remove callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 07, 2022 at 05:23:40PM +0200, Andy Shevchenko wrote:
> On Mon, Feb 7, 2022 at 5:08 PM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> >
> > The only difference between returning zero or a non-zero value is that
> > for the non-zero case the i2c will print a generic error message
> > ("remove failed (-ESOMETHING), will be ignored").
> >
> > In this case however the driver itself already emitted a more helpful
> > error message, so the additional error message isn't helpful at all.
> >
> > The long-term goal is to make the i2c remove callback return void, making
> > all implementations return 0 is preparatory work for this change.
> 
> ...
> 
> > +       lm3692x_leds_disable(led);
> 
> Since it emits a message, perhaps converting it to void also can be
> done here. Otherwise what's the point to have it int?

There is another caller (lm3692x_leds_disable) where the return value is
used. So I didn't convert it to return void.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux