CC: [email protected] BCC: [email protected] CC: [email protected] TO: Thomas Zimmermann <[email protected]> CC: Javier Martinez Canillas <[email protected]> CC: Rob Herring <[email protected]> CC: Frank Rowand <[email protected]> CC: [email protected] CC: [email protected]
From: kernel test robot <[email protected]> drivers/of/platform.c:558:2-23: WARNING: Function "for_each_node_by_type" should have of_node_put() before return around line 564. Semantic patch information: False positives can be due to function calls within the for_each loop that may encapsulate an of_node_put. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: 52b1b46c39ae ("of: Create platform devices for OF framebuffers") Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 40d8d4bd06720aed6c1125bab7296c57de4f1157 commit: 52b1b46c39ae4321459a1a28dd4e596497b375b8 [1/3] of: Create platform devices for OF framebuffers :::::: branch date: 6 hours ago :::::: commit date: 22 hours ago Please take the patch only if it's a positive warning. Thanks! drivers/of/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -560,8 +560,10 @@ static int __init of_platform_default_po !of_get_property(node, "linux,boot-display", NULL)) continue; dev = of_platform_device_create(node, "of-display", NULL); - if (WARN_ON(!dev)) + if (WARN_ON(!dev)) { + of_node_put(node); return -ENOMEM; + } boot_display = node; break; } _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
