[PATCH 3.16 046/133] pwm: tiehrpwm: Fix runtime PM imbalance at unbind

From: Ben Hutchings
Date: Tue Nov 21 2017 - 21:28:40 EST


3.16.51-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Johan Hovold <johan@xxxxxxxxxx>

commit c7fdd3f52944b81d807ce7a5fde7d1ca8a2a0919 upstream.

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@xxxxxxxxxx>
Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
drivers/pwm/pwm-tiehrpwm.c | 1 -
1 file changed, 1 deletion(-)

--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -524,7 +524,6 @@ static int ehrpwm_pwm_remove(struct plat
pwmss_submodule_state_change(pdev->dev.parent, PWMSS_EPWMCLK_STOP_REQ);
pm_runtime_put_sync(&pdev->dev);

- pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
return pwmchip_remove(&pc->chip);
}