From: Minghao Chi Date: Mon, 18 Apr 2022 06:30:59 +0000 (+0000) Subject: soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync X-Git-Tag: howlett/maple/20220722_2~450^2~4^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2b7042500cab7952bdbf4fe4a84de8712b418c36;p=users%2Fjedix%2Flinux-maple.git soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync Using pm_runtime_resume_and_get is more appropriate for simplifing code Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Nishanth Menon Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20220418063059.2558074-1-chi.minghao@zte.com.cn --- diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c index 7bab4bbaf02dc..ce09c42eaed25 100644 --- a/drivers/soc/ti/pm33xx.c +++ b/drivers/soc/ti/pm33xx.c @@ -555,11 +555,9 @@ static int am33xx_pm_probe(struct platform_device *pdev) #endif /* CONFIG_SUSPEND */ pm_runtime_enable(dev); - ret = pm_runtime_get_sync(dev); - if (ret < 0) { - pm_runtime_put_noidle(dev); + ret = pm_runtime_resume_and_get(dev); + if (ret < 0) goto err_pm_runtime_disable; - } ret = pm_ops->init(am33xx_do_sram_idle); if (ret) {