]> git.baikalelectronics.ru Git - kernel.git/commit
opp: Increase parsed_static_opps in _of_add_opp_table_v1()
authorWalter Lozano <walter.lozano@collabora.com>
Thu, 16 Jul 2020 02:54:52 +0000 (23:54 -0300)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 16 Jul 2020 03:20:54 +0000 (08:50 +0530)
commit11999e6d71b3aa4397f1cb4211e5c5be5e327d2f
tree42b31c7dde572112356b535570e8e70b8f095a92
parent74a27a5f5a99e6b5adfd790053b6cccac3270c76
opp: Increase parsed_static_opps in _of_add_opp_table_v1()

Currently, when using _of_add_opp_table_v2 parsed_static_opps is
increased and this value is used in _opp_remove_all_static() to
check if there are static opp entries that need to be freed.
Unfortunately this does not happen when using _of_add_opp_table_v1(),
which leads to warnings.

This patch increases parsed_static_opps in _of_add_opp_table_v1() in a
similar way as in _of_add_opp_table_v2().

Fixes: 026b83225fcb ("opp: Replace list_kref with a local counter")
Cc: v5.6+ <stable@vger.kernel.org> # v5.6+
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
[ Viresh: Do the operation with lock held and set the value to 1 instead
  of incrementing it ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c