Return-Path: Received: from mail-qk0-f195.google.com ([209.85.220.195]:38673 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbdISAvp (ORCPT ); Mon, 18 Sep 2017 20:51:45 -0400 From: Florian Fainelli To: alexander.levin@verizon.com Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, johan@kernel.org, jesse@kernel.org, Florian Fainelli 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 Message-Id: <20170919005137.31773-2-f.fainelli@gmail.com> In-Reply-To: <20170919005137.31773-1-f.fainelli@gmail.com> References: <20170919005137.31773-1-f.fainelli@gmail.com> Sender: stable-owner@vger.kernel.org List-ID: 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 --- 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