Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632519 > unrolled thread

[PATCH] of: unittest, fix possible use of unitialized variable

Started byfrowand.list@gmail.com
First post2017-04-28 06:40 +0200
Last post2017-04-28 06:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] of: unittest, fix possible use of unitialized variable frowand.list@gmail.com - 2017-04-28 06:40 +0200

#1632519 — [PATCH] of: unittest, fix possible use of unitialized variable

Fromfrowand.list@gmail.com
Date2017-04-28 06:40 +0200
Subject[PATCH] of: unittest, fix possible use of unitialized variable
Message-ID<tB5Rf-2sa-3@gated-at.bofh.it>
From: Frank Rowand <frank.rowand@sony.com>

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@sony.com>
---
 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@sony.com>

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web