Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: 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 <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220418110455.2559264-1-chi.minghao@zte.com.cn
[sboyd@kernel.org: Drop local ret variable too]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Minghao Chi and committed by
Stephen Boyd
3196a605 bab79506

+1 -8
+1 -8
drivers/clk/clk.c
··· 108 108 /*** runtime pm ***/ 109 109 static int clk_pm_runtime_get(struct clk_core *core) 110 110 { 111 - int ret; 112 - 113 111 if (!core->rpm_enabled) 114 112 return 0; 115 113 116 - ret = pm_runtime_get_sync(core->dev); 117 - if (ret < 0) { 118 - pm_runtime_put_noidle(core->dev); 119 - return ret; 120 - } 121 - return 0; 114 + return pm_runtime_resume_and_get(core->dev); 122 115 } 123 116 124 117 static void clk_pm_runtime_put(struct clk_core *core)