PM / OPP: fix incorrect OPP count handling in of_init_opp_table

In of_init_opp_table function, if a failure to add an OPP is
detected, the count of OPPs, yet to be added is not updated.
Fix this by decrementing this count on failure as well.

Signed-off-by: Chander Kashyap <k.chander@samsung.com>
Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 3.7+ <stable@vger.kernel.org> # 3.7+
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 086abb58590a4df73e8a6ed71fd418826937cd46)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 file changed