Re: [PATCH v1 02/28] leds: core: The -ENOTSUPP should never be seen by user space

From: Andy Shevchenko
Date: Sat May 29 2021 - 05:42:53 EST


On Fri, May 28, 2021 at 1:43 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Fri, May 28, 2021 at 12:03:39PM +0200, Pavel Machek wrote:
> > On Mon 2021-05-10 12:50:19, Andy Shevchenko wrote:
> > > Replace -ENOTSUPP by -EOPNOTSUPP when returning from exported function.
> > >
> > > Fixes: 13ae79bbe4c2 ("leds: core: Drivers shouldn't enforce SYNC/ASYNC brightness setting")
> > > Cc: Jacek Anaszewski <j.anaszewski@xxxxxxxxxxx>
> > > Signed-off-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> >
> > Are you sure this is real problem?
>
> (Potential) real problem, yes.
>
> » This does not sound like an error
> > path that should happen.
>
> Before crafting this patch I have checked callers and _luckily_ they haven't
> tested the returned code. But if any of the user decides to check -> real
> problem.

I have rephrased the commit message to point out the above.

--
With Best Regards,
Andy Shevchenko