* [PATCH] of: unittest, fix possible use of unitialized variable
@ 2017-04-28 4:31 frowand.list-Re5JQEeQqe8AvxtiuMwx3w
0 siblings, 0 replies; only message in thread
From: frowand.list-Re5JQEeQqe8AvxtiuMwx3w @ 2017-04-28 4:31 UTC (permalink / raw)
To: Rob Herring, stephen.boyd-QSEj5FYQhm4dnm+yROfE0A
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
From: Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>
Fix problem reported in the linux-next build. last_sibling may be
unitialized in of_unittest() if the device tree is empty.
Signed-off-by: Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>
---
drivers/of/unittest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 12597ff8cfb0..8f14a43f48e5 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -2119,7 +2119,7 @@ static int __init overlay_data_add(int onum)
*/
static __init void of_unittest_overlay_high_level(void)
{
- struct device_node *last_sibling;
+ struct device_node *last_sibling = NULL;
struct device_node *np;
struct device_node *of_symbols;
struct device_node *overlay_base_symbols;
--
Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-28 4:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 4:31 [PATCH] of: unittest, fix possible use of unitialized variable frowand.list-Re5JQEeQqe8AvxtiuMwx3w
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).