Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b712f00a authored by Frank Rowand's avatar Frank Rowand Committed by Greg Kroah-Hartman
Browse files

of: unittest: kmemleak in of_unittest_platform_populate()



[ Upstream commit 216830d2413cc61be3f76bc02ffd905e47d2439e ]

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

of_unittest_platform_populate() left an elevated reference count for
grandchild nodes (which are platform devices).  Fix the platform
device reference counts so that the memory will be freed.

Fixes: fb2caa50 ("of/selftest: add testcase for nodes with same name and address")
Reported-by: default avatarErhard F. <erhard_f@mailbox.org>
Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f463b127
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment