summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2017-12-21 18:37:35 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-01-02 09:39:17 +0100
commit156dd39219b159d03762af32f1a0acd05d0cd726 (patch)
treed4c48efc865c268355dfe50d1d8d9e339e51dd0f /drivers/gpio
parentdd3b9a44083d3815517a692f8181be8c30c0a1aa (diff)
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 <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c1
1 files changed, 1 insertions, 0 deletions
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.