opp: Free static OPPs on errors while adding them
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 18 Nov 2019 09:11:07 +0000 (14:41 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 10 Dec 2019 10:26:56 +0000 (15:56 +0530)
commitba0033192145cbd4e70ef64552958b13d597eb9e
treeb250718e6bff03d27ad6f85e0bbb8359dc70f2ac
parente42617b825f8073569da76dc4510bfa019b1c35a
opp: Free static OPPs on errors while adding them

The static OPPs aren't getting freed properly, if errors occur while
adding them. Fix that by calling _put_opp_list_kref() and putting their
reference on failures.

Fixes: 11e1a1648298 ("opp: Don't decrement uninitialized list_kref")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c