Skip to content

Commit

Permalink
of: fdt: Fix return value in __unflatten_device_tree()
Browse files Browse the repository at this point in the history
Commit 78de28c ("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: 78de28c ("of: fdt: add missing allocation-failure check")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
  • Loading branch information
Florian Fainelli authored and Sasha Levin committed Oct 6, 2017
1 parent a60e407 commit 6a4a181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/fdt.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 6a4a181

Please sign in to comment.