Skip to content

Commit 3196a60

Browse files
Minghao Chibebarino
authored andcommitted
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>
1 parent bab7950 commit 3196a60

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

drivers/clk/clk.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,10 @@ struct clk {
108108
/*** runtime pm ***/
109109
static int clk_pm_runtime_get(struct clk_core *core)
110110
{
111-
int ret;
112-
113111
if (!core->rpm_enabled)
114112
return 0;
115113

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);
122115
}
123116

124117
static void clk_pm_runtime_put(struct clk_core *core)

0 commit comments

Comments
 (0)