Commit df6dccb4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Bartosz Golaszewski
Browse files

gpiolib: Revert "Don't WARN on gpiod_put() for optional GPIO"



No need to double check the pointer for NULL since gpiod_free()
is using VALIDATE_DESC_VOID() which simply returns in that case.

This reverts commit 1d7765ba.

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250416095645.2027695-5-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
parent b709d676
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -5140,7 +5140,6 @@ EXPORT_SYMBOL_GPL(gpiod_get_array_optional);
 */
void gpiod_put(struct gpio_desc *desc)
{
	if (desc)
	gpiod_free(desc);
}
EXPORT_SYMBOL_GPL(gpiod_put);