]> git.baikalelectronics.ru Git - kernel.git/commit
OPP: Fix parsing of multiple phandles in "operating-points-v2" property
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 23 Nov 2018 05:06:07 +0000 (10:36 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 23 Nov 2018 05:17:21 +0000 (10:47 +0530)
commitd3b947c6458d2a3c7bf94396c4d23ae63d75cc74
treeb647329140ca9360b39c1a6fbe0fea9b3fb7bec0
parentfa6bb9e5e4113644574f5b57a9a4323ed5f88b28
OPP: Fix parsing of multiple phandles in "operating-points-v2" property

We currently return error if more than one phandle is present in the
"operating-points-v2" property, which is incorrect. We only want to
check the count of phandles here and set index to 0 if only one phandle
is present.

Fix it.

Fixes: bd8dbfd84133 ("OPP: Pass OPP table to _of_add_opp_table_v{1|2}()")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c