On Tue, Apr 21, 2020 at 07:09:37PM +0200, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From 216830d2413cc61be3f76bc02ffd905e47d2439e Mon Sep 17 00:00:00 2001 From: Frank Rowand <frank.rowand@xxxxxxxx> Date: Thu, 16 Apr 2020 16:42:47 -0500 Subject: [PATCH] of: unittest: kmemleak in of_unittest_platform_populate() 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: fb2caa50fbac ("of/selftest: add testcase for nodes with same name and address") Reported-by: Erhard F. <erhard_f@xxxxxxxxxxx> Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxx> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
Conflict with a613b26a5013 ("of: Convert to using %pOFn instead of device_node.name"). Fixed and queued for 4.14-4.4. -- Thanks, Sasha