]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
of: fdt: Fix return with value in void function
authorBen Hutchings <ben@decadent.org.uk>
Mon, 26 Feb 2018 16:32:31 +0000 (16:32 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 3 Mar 2018 15:52:29 +0000 (15:52 +0000)
Commit 49e67dd17649 "of: fdt: add missing allocation-failure check"
added a "return NULL" statement in __unflatten_device_tree().  When
applied to the 3.16-stable branch, this introduced a compiler warning
(not an error!) because the function returns void here.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/of/fdt.c

index ff01ee27130d34dcc3d4de0067334fe792e98089..4159ae251ffc078050b9b889e9ef985083304b06 100644 (file)
@@ -381,7 +381,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);