stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [linux-4.1.y] Build warning from the commit 78de28c67c8f ("of: fdt: add missing allocation-failure check")
       [not found] <CGME20170801031051epcas2p23bfe54c29b5442d96d44c3e6ca6df404@epcas2p2.samsung.com>
@ 2017-08-01  3:11 ` Seung-Woo Kim
  0 siblings, 0 replies; only message in thread
From: Seung-Woo Kim @ 2017-08-01  3:11 UTC (permalink / raw)
  To: alexander.levin, stable; +Cc: Seung-Woo Kim, johan

Hello,

After applying the commit 78de28c67c8f ("of: fdt: add missing
allocation-failure check") to linux-4.1.y tree, there is build warning.

drivers/of/fdt.c: In function 占쏙옙__unflatten_device_tree占쏙옙:
drivers/of/fdt.c:416:10: warning: 占쏙옙return占쏙옙 with a value, in function
returning void
   return NULL;
          ^
drivers/of/fdt.c:381:13: note: declared here
 static void __unflatten_device_tree(void *blob,
             ^~~~~~~~~~~~~~~~~~~~~~~

It seems to be fixed as like following:
---
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index ae1b654..531b486 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -417,7 +417,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);



---

Best Regards,
- Seung-Woo Kim

-- 
Seung-Woo Kim
Samsung Software R&D Center
--

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-01  3:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20170801031051epcas2p23bfe54c29b5442d96d44c3e6ca6df404@epcas2p2.samsung.com>
2017-08-01  3:11 ` [linux-4.1.y] Build warning from the commit 78de28c67c8f ("of: fdt: add missing allocation-failure check") Seung-Woo Kim

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).