stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seung-Woo Kim <sw0312.kim@samsung.com>
To: alexander.levin@verizon.com, stable@vger.kernel.org
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>, johan@kernel.org
Subject: [linux-4.1.y] Build warning from the commit 78de28c67c8f ("of: fdt: add missing allocation-failure check")
Date: Tue, 01 Aug 2017 12:11:13 +0900	[thread overview]
Message-ID: <597FF151.3020805@samsung.com> (raw)
In-Reply-To: CGME20170801031051epcas2p23bfe54c29b5442d96d44c3e6ca6df404@epcas2p2.samsung.com

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

           reply	other threads:[~2017-08-01  3:10 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CGME20170801031051epcas2p23bfe54c29b5442d96d44c3e6ca6df404@epcas2p2.samsung.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=597FF151.3020805@samsung.com \
    --to=sw0312.kim@samsung.com \
    --cc=alexander.levin@verizon.com \
    --cc=johan@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).