* [PATCH] gpiolib: add desc validation to gpiod_set_transitory()
@ 2017-12-21 16:37 Vladimir Zapolskiy
  2018-01-02  8:39 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2017-12-21 16:37 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio
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 <vz@mleia.com>
---
 drivers/gpio/gpiolib.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 6e19385..a34ea9d 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2546,6 +2546,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.
-- 
2.10.2
^ permalink raw reply related	[flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-02  8:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 16:37 [PATCH] gpiolib: add desc validation to gpiod_set_transitory() Vladimir Zapolskiy
2018-01-02  8:39 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).