linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: zynq: Fix the error path
@ 2016-04-04 18:14 Shubhrajyoti Datta
  2016-04-06 13:40 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Shubhrajyoti Datta @ 2016-04-04 18:14 UTC (permalink / raw)
  To: linux-gpio
  Cc: linux-kernel, linus.walleij, gnurou, michal.simek,
	soren.brinkmann, Shubhrajyoti Datta

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>
---
 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 66d3d24..75c6355 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;
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: zynq: Fix the error path
  2016-04-04 18:14 [PATCH] gpio: zynq: Fix the error path Shubhrajyoti Datta
@ 2016-04-06 13:40 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-04-06 13:40 UTC (permalink / raw)
  To: Shubhrajyoti Datta
  Cc: linux-gpio, linux-kernel, Alexandre Courbot, Michal Simek,
	Sören Brinkmann, Shubhrajyoti Datta

On Mon, Apr 4, 2016 at 8:14 PM, Shubhrajyoti Datta
<shubhrajyoti.datta@xilinx.com> wrote:

> 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>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-06 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04 18:14 [PATCH] gpio: zynq: Fix the error path Shubhrajyoti Datta
2016-04-06 13:40 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).