msm: vreg: Fix the vreg list for dangling node
While doing vreg_put call, it is just freeing the
vreg name and vreg regulator structure, but the node
in the list is still present, which will casue memory
leak and may lead to kernel panic.
One scenario to reproduce the issue is continuously use
of vreg_put/vreg_get apis and as it will increase the
dangling node in the list and results in the problem.
Hence delete the node from the list while calling vreg_put.
CRs-Fixed: 340097
Change-Id: I247e9674c31836f0af3ce28b3e2ae6700a12dcae
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
1 file changed