summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-zynq.c
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2016-04-04 21:14:06 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-04-09 21:14:36 +0300
commit615d23f80efc60f8c5146223f305d19207c742e4 (patch)
tree44a6c658e2524037ac2f6194464013a10e67c982 /drivers/gpio/gpio-zynq.c
parentbd37c999c7ca76afd4f28987314e98e022875dbc (diff)
downloadlinux-615d23f80efc60f8c5146223f305d19207c742e4.tar.xz
gpio: zynq: Fix the error path
pm_runtime_disable is called only in remove it is missed out in the error path. Fix the same. Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-zynq.c')
-rw-r--r--drivers/gpio/gpio-zynq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 66d3d247d76d..75c6355b018d 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -713,7 +713,7 @@ static int zynq_gpio_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0)
- return ret;
+ goto err_pm_dis;
/* report a bug if gpio chip registration fails */
ret = gpiochip_add_data(chip, gpio);
@@ -745,6 +745,8 @@ err_rm_gpiochip:
gpiochip_remove(chip);
err_pm_put:
pm_runtime_put(&pdev->dev);
+err_pm_dis:
+ pm_runtime_disable(&pdev->dev);
return ret;
}