]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpiolib: Reuse return variable in gpiod_to_irq()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 16 Apr 2025 09:55:15 +0000 (12:55 +0300)
committerBartosz Golaszewski <brgl@bgdev.pl>
Thu, 17 Apr 2025 13:22:06 +0000 (15:22 +0200)
commit7cc868831b98eb10e8ae50a8e5a9f04674d1a2ab
tree3ea6ee8d606bb244be5f21ee65f8cf2269c333e4
parent8c13e6a3d588320327b67727c1b9a0dea843ca74
gpiolib: Reuse return variable in gpiod_to_irq()

There are two variables for the same used in the gpiod_to_irq().
Replace the second by reusing the function top-level one.
While at it, refactor the branch to have less lines of code.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250416095645.2027695-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpiolib.c