Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753574AbcKARiO (ORCPT ); Tue, 1 Nov 2016 13:38:14 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33170 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752633AbcKARiN (ORCPT ); Tue, 1 Nov 2016 13:38:13 -0400 Date: Tue, 1 Nov 2016 20:38:08 +0300 From: Eugene Korenevsky To: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org Cc: Matt Fleming , Linn Crosetto Subject: [PATCH] EFI loader: remove dead code Message-ID: <20161101173808.GA2682@vnote> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 27 *e820ext is always NULL in 'alloc_e820ext()' (see the code of 'exit_boot()'). Therefore the 'if' condition is always false and the entire 'if' statement is pointless. Remove it. --- arch/x86/boot/compressed/eboot.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index cc69e37..edfd4d6 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -956,12 +956,6 @@ static efi_status_t alloc_e820ext(u32 nr_desc, struct setup_data **e820ext, size = sizeof(struct setup_data) + sizeof(struct e820entry) * nr_desc; - if (*e820ext) { - efi_call_early(free_pool, *e820ext); - *e820ext = NULL; - *e820ext_size = 0; - } - status = efi_call_early(allocate_pool, EFI_LOADER_DATA, size, (void **)e820ext); if (status == EFI_SUCCESS) -- 2.10.2