From 156dd39219b159d03762af32f1a0acd05d0cd726 Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Thu, 21 Dec 2017 18:37:35 +0200 Subject: [PATCH] gpiolib: add desc validation to gpiod_set_transitory() The gpiod_set_transitory() function is publicly exported, and it is expected from it to be ready for usage with optional GPIOs on consumer's side. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index c23cc6b586ba..7dde703b6da2 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2526,6 +2526,7 @@ int gpiod_set_transitory(struct gpio_desc *desc, bool transitory) int gpio; int rc; + VALIDATE_DESC(desc); /* * Handle FLAG_TRANSITORY first, enabling queries to gpiolib for * persistence state.