Skip to content
Commit 11e1a164 authored by Viresh Kumar's avatar Viresh Kumar
Browse files

opp: Don't decrement uninitialized list_kref



The list_kref was added for static OPPs and to track their users. The
kref is initialized while the static OPPs are added, but removed
unconditionally even if the static OPPs were never added. This causes
refcount mismatch warnings currently.

Fix that by always initializing the kref when the OPP table is first
initialized. The refcount is later incremented only for the second user
onwards.

Fixes: d0e8ae6c ("OPP: Create separate kref for static OPPs list")
Reported-by: default avatarRajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 71419d84
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment