From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932241AbdDDQEy (ORCPT ); Tue, 4 Apr 2017 12:04:54 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36154 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbdDDQD0 (ORCPT ); Tue, 4 Apr 2017 12:03:26 -0400 From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Evgeny Kalugin , Ard Biesheuvel , linux-kernel@vger.kernel.org Subject: [PATCH 06/12] pstore: return error code (if any) from efi_pstore_write Date: Tue, 4 Apr 2017 17:02:42 +0100 Message-Id: <20170404160245.27812-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170404160245.27812-1-ard.biesheuvel@linaro.org> References: <20170404160245.27812-1-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Evgeny Kalugin For some reason return value from actual variable setting was ignored. With this change error code get transferred upwards through call stack. Signed-off-by: Evgeny Kalugin Cc: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/efi-pstore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c index f402ba2eed46..6b5acefce6b3 100644 --- a/drivers/firmware/efi/efi-pstore.c +++ b/drivers/firmware/efi/efi-pstore.c @@ -274,9 +274,9 @@ static int efi_pstore_write(enum pstore_type_id type, for (i = 0; i < DUMP_NAME_LEN; i++) efi_name[i] = name[i]; - efivar_entry_set_safe(efi_name, vendor, PSTORE_EFI_ATTRIBUTES, - !pstore_cannot_block_path(reason), - size, psi->buf); + ret = efivar_entry_set_safe(efi_name, vendor, PSTORE_EFI_ATTRIBUTES, + !pstore_cannot_block_path(reason), + size, psi->buf); if (reason == KMSG_DUMP_OOPS) efivar_run_worker(); -- 2.9.3