]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: Don't free if pin ranges are not defined
authorEdmond Chung <edmondchung@google.com>
Mon, 30 Nov 2020 22:47:53 +0000 (22:47 +0000)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 2 Dec 2020 09:40:55 +0000 (10:40 +0100)
commit6dbbf84603961d4e8eaea46e3530373c8cffee67
treea8e66c902eebae129d1d4296cb668b9dfeec8aca
parent60593df667e087b009ee0fc20d92e9c4c096a9b5
gpiolib: Don't free if pin ranges are not defined

A similar check was added in gpiochip_generic_request, but not in free.
This has caused an imbalance count of request vs. free calls to the
pinctrl driver. This patch is targeted to fix that issue.

Fixes: 2ab73c6d8323 ("gpio: Support GPIO controllers without pin-ranges")
Signed-off-by: Edmond Chung <edmondchung@google.com>
Signed-off-by: Andrew Chant <achant@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib.c