Commit 0b7277e0 authored by Aleks Todorov's avatar Aleks Todorov Committed by Viresh Kumar
Browse files

OPP: Return correct value in dev_pm_opp_get_level



Commit 073d3d2c ("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: 073d3d2c ("OPP: Level zero is valid")
Signed-off-by: default avatarAleks Todorov <aleksbgbg@google.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 549a1be5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;