aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 8d2940517c99..317004fd94fb 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -792,6 +792,8 @@ void gpio_free(unsigned gpio)
792 unsigned long flags; 792 unsigned long flags;
793 struct gpio_desc *desc; 793 struct gpio_desc *desc;
794 794
795 might_sleep();
796
795 if (!gpio_is_valid(gpio)) { 797 if (!gpio_is_valid(gpio)) {
796 WARN_ON(extra_checks); 798 WARN_ON(extra_checks);
797 return; 799 return;