Re: [PATCH v1 7/7] gpiolib: Remove redundant assignment of return variable

Linus Walleij
2025-04-16T08:47:21Z

On Tue, Apr 15, 2025 at 1:11 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> In some functions the returned variable is assigned to 0 and then
> reassigned to the actual value. Remove redundant assignments.
>
> In one case make it more clear that the assignment is not needed.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

This is actually really good, because if someone goofs up the code
so that assignment is actually needed then the compiler will
complain. (Arnd told me this.)

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij