]> git.baikalelectronics.ru Git - kernel.git/commit
of: unittest: kmemleak on changeset destroy
authorFrank Rowand <frank.rowand@sony.com>
Thu, 16 Apr 2020 21:42:46 +0000 (16:42 -0500)
committerRob Herring <robh@kernel.org>
Fri, 17 Apr 2020 13:31:34 +0000 (08:31 -0500)
commit08c99842af1564d41bc8687c459af220fa16c035
tree094aafa40e72b92a4524f7cf98dc08abca883468
parent160a4b6cba1f1deffc671b708c267239eeb76d63
of: unittest: kmemleak on changeset destroy

kmemleak reports several memory leaks from devicetree unittest.
This is the fix for problem 1 of 5.

of_unittest_changeset() reaches deeply into the dynamic devicetree
functions.  Several nodes were left with an elevated reference
count and thus were not properly cleaned up.  Fix the reference
counts so that the memory will be freed.

Fixes: aa11035132ff ("of: Transactional DT support.")
Reported-by: Erhard F. <erhard_f@mailbox.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/unittest.c