PM / OPP: of_property_count_u32_elems() can return errors
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 22 Sep 2015 16:35:31 +0000 (09:35 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 25 Sep 2015 00:35:54 +0000 (02:35 +0200)
commit680168a58a9315e1301f4ebb062244470d4919b0
treeb17bc6c721c07ce9bd3136f07df91b52c3b826ec
parent1f93e4a96c9109378204c147b3eec0d0e8100fde
PM / OPP: of_property_count_u32_elems() can return errors

of_property_count_u32_elems() will never return 0, but a -ve error value
of a positive count. And so the current !count check is wrong.

Also, a missing "opp-microvolt" property isn't a problem and so we need
to do of_find_property() separately to confirm that.

Fixes: 274659029c9d (PM / OPP: Add support to parse "operating-points-v2" bindings)
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c