diff mbox series

[linux-next] thermal/drivers/k3_j72xx_bandgap:using the pm_runtime_resume_and_get to simplify the code

Message ID 20220801023824.1595268-1-ye.xingchen@zte.com.cn
State New
Headers show
Series [linux-next] thermal/drivers/k3_j72xx_bandgap:using the pm_runtime_resume_and_get to simplify the code | expand

Commit Message

Lv Ruyi Aug. 1, 2022, 2:38 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

Using pm_runtime_resume_and_get() to instade of  pm_runtime_get_sync
and pm_runtime_put_noidle.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/thermal/k3_j72xx_bandgap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c
index 115a44eb4fbf..5aabb89cf46d 100644
--- a/drivers/thermal/k3_j72xx_bandgap.c
+++ b/drivers/thermal/k3_j72xx_bandgap.c
@@ -403,9 +403,8 @@  static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
 		workaround_needed = driver_data->has_errata_i2128;
 
 	pm_runtime_enable(dev);
-	ret = pm_runtime_get_sync(dev);
+	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0) {
-		pm_runtime_put_noidle(dev);
 		pm_runtime_disable(dev);
 		return ret;
 	}