Skip to content

Commit 0ac2209

Browse files
z00448126brgl
authored andcommitted
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>
1 parent b650545 commit 0ac2209

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpio/gpio-arizona.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)
192192
ret = devm_gpiochip_add_data(&pdev->dev, &arizona_gpio->gpio_chip,
193193
arizona_gpio);
194194
if (ret < 0) {
195+
pm_runtime_disable(&pdev->dev);
195196
dev_err(&pdev->dev, "Could not register gpiochip, %d\n",
196197
ret);
197198
return ret;

0 commit comments

Comments
 (0)