lkml.org 
[lkml]   [2023]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpiolib: sysfs: Fix improper error handling on failed export
Hi Andy

thank you for your feedback

On Thu, Nov 23, 2023 at 3:25 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Thu, Nov 23, 2023 at 3:30 PM Boerge Struempfel
> <boerge.struempfel@gmail.com> wrote:
> >
> > If gpio_set_transitory fails, we should free the gpio again. Most
>
> We refer to functions as func() in the text and comments (note parentheses).
>
> GPIO

Thanks for letting me know, I will update the the commit message in
regards to this.

>
> > notably, the flag FLAG_REQUESTED has previously been set in
> > gpiod_request_commit, and should be reset on failure.
>
> Same about func().
>
> ...
>
> Seems the correct fix, but you may also add that no existing user is
> returning anything except 0 or ENOTSUPP that is converted to 0 in
> GPIOLIB core code. Hence no Fixes tag is needed, but still possible if
> maintainers want it.
>

You are right. For now, all mainline users are returning 0. We only found
this due to downstream-specific code. I'll add a comment about this not
affecting any existing users to the commit message.

> --
> With Best Regards,
> Andy Shevchenko

\
 
 \ /
  Last update: 2023-11-23 16:01    [W:0.049 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site