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.

This patch is targeted for 3.10-ltsi, and changed the function
name from original patch. (dev_pm_opp_add -> opp_add)
Since both functions are the same implementation, there is no
adverse effect in this revise.

In 3.12, the functions is renamed by the following commit.
  commit 5d4879cda67b09f086807821cf594ee079d6dfbe
  PM / OPP: rename functions to dev_pm_opp*
  - 3.10 : opp_add
  - 3.12 : dev_pm_opp_add

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: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Conflicts:
	drivers/base/power/opp.c
1 file changed