* [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind
@ 2017-07-20 10:48 Johan Hovold
2017-07-20 10:48 ` [PATCH 2/2] pwm: tiehrpwm: fix clock imbalance in probe error path Johan Hovold
2017-08-21 6:09 ` [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind Thierry Reding
0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2017-07-20 10:48 UTC (permalink / raw)
To: Thierry Reding; +Cc: linux-pwm, linux-kernel, Johan Hovold
Remove unbalanced RPM put at driver unbind which resulted in a negative
usage count.
Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/pwm/pwm-tiehrpwm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index b5c6b0636893..6e51a075d1a7 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -504,7 +504,6 @@ static int ehrpwm_pwm_remove(struct platform_device *pdev)
clk_unprepare(pc->tbclk);
- pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
return pwmchip_remove(&pc->chip);
}
--
2.13.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] pwm: tiehrpwm: fix clock imbalance in probe error path
2017-07-20 10:48 [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind Johan Hovold
@ 2017-07-20 10:48 ` Johan Hovold
2017-08-21 6:09 ` [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind Thierry Reding
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2017-07-20 10:48 UTC (permalink / raw)
To: Thierry Reding; +Cc: linux-pwm, linux-kernel, Johan Hovold
Make sure to unprepare the clock before returning on late probe errors.
Fixes: b388f15fd14c ("pwm: pwm-tiehrpwm: Use clk_enable/disable instead clk_prepare/unprepare.")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/pwm/pwm-tiehrpwm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 6e51a075d1a7..387eaf1bac85 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -489,13 +489,18 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
ret = pwmchip_add(&pc->chip);
if (ret < 0) {
dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
- return ret;
+ goto err_clk_unprepare;
}
pm_runtime_enable(&pdev->dev);
platform_set_drvdata(pdev, pc);
return 0;
+
+err_clk_unprepare:
+ clk_unprepare(pc->tbclk);
+
+ return ret;
}
static int ehrpwm_pwm_remove(struct platform_device *pdev)
--
2.13.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind
2017-07-20 10:48 [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind Johan Hovold
2017-07-20 10:48 ` [PATCH 2/2] pwm: tiehrpwm: fix clock imbalance in probe error path Johan Hovold
@ 2017-08-21 6:09 ` Thierry Reding
1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2017-08-21 6:09 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-pwm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
On Thu, Jul 20, 2017 at 12:48:16PM +0200, Johan Hovold wrote:
> Remove unbalanced RPM put at driver unbind which resulted in a negative
> usage count.
>
> Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/pwm/pwm-tiehrpwm.c | 1 -
> 1 file changed, 1 deletion(-)
Both patches applied to for-4.14/drivers, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-21 6:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-20 10:48 [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind Johan Hovold
2017-07-20 10:48 ` [PATCH 2/2] pwm: tiehrpwm: fix clock imbalance in probe error path Johan Hovold
2017-08-21 6:09 ` [PATCH 1/2] pwm: tiehrpwm: fix runtime pm imbalance at unbind Thierry Reding
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).