diff options
| author | Aleks Todorov | 2026-01-23 14:03:44 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman | 2026-02-26 14:59:00 -0800 |
| commit | 27feb209c2d7bf86d652ff9f5a66c078f30ad71a (patch) | |
| tree | 044447a05b97b83a5d68f73a03a3e2528e1c3aa9 /drivers/opp | |
| parent | 095417d6b669c2dec39a5842ccb94df915f97f54 (diff) | |
OPP: Return correct value in dev_pm_opp_get_level
[ Upstream commit 0b7277e02dabba2a9921a7f4761ae6e627e7297a ]
Commit 073d3d2ca7d4 ("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: 073d3d2ca7d4 ("OPP: Level zero is valid")
Signed-off-by: Aleks Todorov <aleksbgbg@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/opp')
| -rw-r--r-- | drivers/opp/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c index bba4f7daff8c..775d4a36f2f5 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -241,7 +241,7 @@ unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp) { if (IS_ERR_OR_NULL(opp) || !opp->available) { pr_err("%s: Invalid parameters\n", __func__); - return 0; + return U32_MAX; } return opp->level; |
