diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2016-04-04 14:14:06 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-04-09 14:14:36 -0400 |
commit | 615d23f80efc60f8c5146223f305d19207c742e4 (patch) | |
tree | 44a6c658e2524037ac2f6194464013a10e67c982 /drivers/gpio/gpio-zynq.c | |
parent | bd37c999c7ca76afd4f28987314e98e022875dbc (diff) |
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.c | 4 |
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) | |||
713 | pm_runtime_enable(&pdev->dev); | 713 | pm_runtime_enable(&pdev->dev); |
714 | ret = pm_runtime_get_sync(&pdev->dev); | 714 | ret = pm_runtime_get_sync(&pdev->dev); |
715 | if (ret < 0) | 715 | if (ret < 0) |
716 | return ret; | 716 | goto err_pm_dis; |
717 | 717 | ||
718 | /* report a bug if gpio chip registration fails */ | 718 | /* report a bug if gpio chip registration fails */ |
719 | ret = gpiochip_add_data(chip, gpio); | 719 | ret = gpiochip_add_data(chip, gpio); |
@@ -745,6 +745,8 @@ err_rm_gpiochip: | |||
745 | gpiochip_remove(chip); | 745 | gpiochip_remove(chip); |
746 | err_pm_put: | 746 | err_pm_put: |
747 | pm_runtime_put(&pdev->dev); | 747 | pm_runtime_put(&pdev->dev); |
748 | err_pm_dis: | ||
749 | pm_runtime_disable(&pdev->dev); | ||
748 | 750 | ||
749 | return ret; | 751 | return ret; |
750 | } | 752 | } |