mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
opp: Fix return in _opp_add_static_v2()
[ Upstream commit27ff8187f1] Fix sparse warning: drivers/opp/of.c:924 _opp_add_static_v2() warn: passing zero to 'ERR_PTR' For duplicate OPPs 'ret' be set to zero. Fixes:deac8703da("PM / OPP: _of_add_opp_table_v2(): increment count only if OPP is added") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bea3213f19
commit
1494389185
@@ -827,7 +827,7 @@ free_required_opps:
|
|||||||
free_opp:
|
free_opp:
|
||||||
_opp_free(new_opp);
|
_opp_free(new_opp);
|
||||||
|
|
||||||
return ERR_PTR(ret);
|
return ret ? ERR_PTR(ret) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initializes OPP tables based on new bindings */
|
/* Initializes OPP tables based on new bindings */
|
||||||
|
|||||||
Reference in New Issue
Block a user