Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34965 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934597AbeB1QIq (ORCPT ); Wed, 28 Feb 2018 11:08:46 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: Subject: [PATCH 3.16 231/254] of: fdt: Fix return with value in void function In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Ben Hutchings 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 --- --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -381,7 +381,7 @@ static void __unflatten_device_tree(void /* 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);