mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: alexander.levin@verizon.com
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	johan@kernel.org, jesse@kernel.org,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH stable 4.1 1/2] of: fdt: Fix return value in __unflatten_device_tree()
Date: Mon, 18 Sep 2017 17:51:36 -0700	[thread overview]
Message-ID: <20170919005137.31773-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170919005137.31773-1-f.fainelli@gmail.com>

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

  reply	other threads:[~2017-09-19  0:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  0:51 [PATCH stable 4.1 0/2] Remove build warnings due to backports Florian Fainelli
2017-09-19  0:51 ` Florian Fainelli [this message]
2017-09-19  0:51 ` [PATCH stable 4.1 2/2] ipv6: Remove sit_gro_receive() Florian Fainelli

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=20170919005137.31773-2-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=alexander.levin@verizon.com \
    --cc=jesse@kernel.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®