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


Groups > linux.kernel > #1734572

[PATCH stable 4.1 1/2] of: fdt: Fix return value in __unflatten_device_tree()

From Florian Fainelli <f.fainelli@gmail.com>
Newsgroups linux.kernel
Subject [PATCH stable 4.1 1/2] of: fdt: Fix return value in __unflatten_device_tree()
Date 2017-09-19 03:00 +0200
Message-ID <urf3j-5wy-9@gated-at.bofh.it> (permalink)
References <urf3j-5wy-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit 78de28c67c8f ("of: fdt: add missing allocation-failure check")
would make us return NULL in a function declared to return void as of
the 4.1 kernel.

Fixes: 78de28c67c8f ("of: fdt: add missing allocation-failure check")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/of/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index bf89754fe973..308a95ead432 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -413,7 +413,7 @@ static void __unflatten_device_tree(void *blob,
 	/* Allocate memory for the expanded device tree */
 	mem = dt_alloc(size + 4, __alignof__(struct device_node));
 	if (!mem)
-		return NULL;
+		return;
 
 	memset(mem, 0, size);
 
-- 
2.14.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH stable 4.1 1/2] of: fdt: Fix return value in __unflatten_device_tree() Florian Fainelli <f.fainelli@gmail.com> - 2017-09-19 03:00 +0200

csiph-web