Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937116AbcJRPcz (ORCPT ); Tue, 18 Oct 2016 11:32:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49844 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936570AbcJRPcg (ORCPT ); Tue, 18 Oct 2016 11:32:36 -0400 Date: Tue, 18 Oct 2016 08:31:58 -0700 From: tip-bot for Dan Carpenter Message-ID: Cc: tglx@linutronix.de, dan.carpenter@oracle.com, torvalds@linux-foundation.org, ard.biesheuvel@linaro.org, peterz@infradead.org, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: tglx@linutronix.de, dan.carpenter@oracle.com, torvalds@linux-foundation.org, ard.biesheuvel@linaro.org, peterz@infradead.org, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <20161018143318.15673-9-matt@codeblueprint.co.uk> References: <20161018143318.15673-9-matt@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] efi/efivar_ssdt_load: Don't return success on allocation failure Git-Commit-ID: a75dcb5848359f488c32c0aef8711d9bd37a77b8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1409 Lines: 40 Commit-ID: a75dcb5848359f488c32c0aef8711d9bd37a77b8 Gitweb: http://git.kernel.org/tip/a75dcb5848359f488c32c0aef8711d9bd37a77b8 Author: Dan Carpenter AuthorDate: Tue, 18 Oct 2016 15:33:18 +0100 Committer: Ingo Molnar CommitDate: Tue, 18 Oct 2016 17:11:20 +0200 efi/efivar_ssdt_load: Don't return success on allocation failure We should return -ENOMEM here, instead of success. Signed-off-by: Dan Carpenter Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables") Link: http://lkml.kernel.org/r/20161018143318.15673-9-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- drivers/firmware/efi/efi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 1ac199c..a4944e2 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -259,8 +259,10 @@ static __init int efivar_ssdt_load(void) } data = kmalloc(size, GFP_KERNEL); - if (!data) + if (!data) { + ret = -ENOMEM; goto free_entry; + } ret = efivar_entry_get(entry, NULL, &size, data); if (ret) {