diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2017-12-21 17:37:35 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-01-02 09:39:17 +0100 |
commit | 156dd39219b159d03762af32f1a0acd05d0cd726 (patch) | |
tree | d4c48efc865c268355dfe50d1d8d9e339e51dd0f /drivers/gpio | |
parent | gpiolib: remove a redundant check in gpiod_to_chip() (diff) | |
download | linux-156dd39219b159d03762af32f1a0acd05d0cd726.tar.xz linux-156dd39219b159d03762af32f1a0acd05d0cd726.zip |
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.c | 1 |
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. |