Skip to content

Commit

Permalink
PM / devfreq: passive: Fix get_target_freq when not using required-opp
Browse files Browse the repository at this point in the history
[ Upstream commit 8c37d01 ]

The 86ad9a2 ("PM / devfreq: Add required OPPs support to passive governor")
supported the required-opp property for using devfreq passive governor.
But, 86ad9a2 has caused the problem on use-case when required-opp
is not used such as exynos-bus.c devfreq driver. So that fix the
get_target_freq of passive governor for supporting the case of when
required-opp is not used.

Fixes: 86ad9a2 ("PM / devfreq: Add required OPPs support to passive governor")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
chanwoochoi authored and gregkh committed Jul 14, 2021
1 parent ba9e414 commit ca46916
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/devfreq/governor_passive.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ static int devfreq_passive_get_target_freq(struct devfreq *devfreq,
dev_pm_opp_put(p_opp);

if (IS_ERR(opp))
return PTR_ERR(opp);
goto no_required_opp;

*freq = dev_pm_opp_get_freq(opp);
dev_pm_opp_put(opp);

return 0;
}

no_required_opp:
/*
* Get the OPP table's index of decided frequency by governor
* of parent device.
Expand Down

0 comments on commit ca46916

Please sign in to comment.