Commit 0ac22098 authored by Zheng Liang's avatar Zheng Liang Committed by Bartosz Golaszewski
Browse files

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:27a49ed1(gpio: arizona: Add support for GPIOs that)
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZheng Liang <zhengliang6@huawei.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent b6505459
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;