Skip to content

Commit 0b7277e

Browse files
Aleksbgbgvireshk
authored andcommitted
OPP: Return correct value in dev_pm_opp_get_level
Commit 073d3d2 ("OPP: Level zero is valid") modified the documentation for this function to indicate that errors should return a non-zero value to avoid colliding with the OPP level zero, however forgot to actually update the return. No in-tree kernel code depends on the error value being 0. Fixes: 073d3d2 ("OPP: Level zero is valid") Signed-off-by: Aleks Todorov <aleksbgbg@google.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 549a1be commit 0b7277e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/opp/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp)
241241
{
242242
if (IS_ERR_OR_NULL(opp) || !opp->available) {
243243
pr_err("%s: Invalid parameters\n", __func__);
244-
return 0;
244+
return U32_MAX;
245245
}
246246

247247
return opp->level;

0 commit comments

Comments
 (0)