Message ID | 20171221163735.6143-1-vz@mleia.com |
---|---|
State | New |
Headers | show |
Series | gpiolib: add desc validation to gpiod_set_transitory() | expand |
On Thu, Dec 21, 2017 at 5:37 PM, Vladimir Zapolskiy <vz@mleia.com> wrote: > 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> Patch applied. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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.
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(+)