summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorZheng Liang <zhengliang6@huawei.com>2020-11-24 06:06:06 +0300
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-12-02 12:40:54 +0300
commit0ac22098de6f9fd460ac1b1cbf6dbd324312161c (patch)
tree0a59ef076b60422337773f171f0d34276ad3fdc0 /drivers/gpio
parentb65054597872ce3aefbc6a666385eabdf9e288da (diff)
downloadlinux-0ac22098de6f9fd460ac1b1cbf6dbd324312161c.tar.xz
gpio: arizona: disable pm_runtime in case of failure
pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced. Fixes:27a49ed17e224(gpio: arizona: Add support for GPIOs that) Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zheng Liang <zhengliang6@huawei.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-arizona.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index 5bda38e0780f..2bc173c352ce 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -192,6 +192,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)
ret = devm_gpiochip_add_data(&pdev->dev, &arizona_gpio->gpio_chip,
arizona_gpio);
if (ret < 0) {
+ pm_runtime_disable(&pdev->dev);
dev_err(&pdev->dev, "Could not register gpiochip, %d\n",
ret);
return ret;