From patchwork Tue Apr 4 16:02:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 96746 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp264018qgd; Tue, 4 Apr 2017 09:04:58 -0700 (PDT) X-Received: by 10.84.174.129 with SMTP id r1mr29938003plb.173.1491321898450; Tue, 04 Apr 2017 09:04:58 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si17845387pgh.300.2017.04.04.09.04.58; Tue, 04 Apr 2017 09:04:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932242AbdDDQEy (ORCPT + 25 others); 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 Received: by mail-wm0-f46.google.com with SMTP id o81so29495685wmb.1 for ; Tue, 04 Apr 2017 09:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RsGdcf/l9Pz6L6KlhRyDpWk7ys5icg29+hWgOhwAziM=; b=IvmWgqDVNWpgewudHP0JJJtkj/MU05m/BB4C0vcikjPmENe8ag1dFZjJtiIbX/4fQr 6fv1Q072zWUg0H6iysXZLVhNjBhj0AxPtsul3hmQh8PMWBl5Oa4yUHSqhUTfWv3EhHg4 u8DTNEfNgTrp8TZ1Xm56VM2/0fdQqqK+sfXRc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RsGdcf/l9Pz6L6KlhRyDpWk7ys5icg29+hWgOhwAziM=; b=grOZklWb9NGzgJ/udJBr+9zkDeCxfRrcWztQSBH9I2xWdlfvipr8UCsT7UWaqldN2U gVNTM6SxQf3an3r1qtPLyBU7BtxNbLcc2NyO1aQNh3iIuOb/y5/2LSziYK8SrpJlED9k ZkofM9mNPvna4iepMg+x1Ia+Ak8V2qWd85S1zNqXo17MNnOKkAV1Dy89KadpfM0a5GoZ zxmCutCuu4R+EOwQKnXMbLs7nJsssHGtM59yx5NrYtQhfppP4wAADiwK9NU9eh0+7kEb Eii8WaJ3Gfm7f0JWT0GIrxcxFVJOjKRC7ahMj52r2Q0qJZw2JS3GCtbYZ3NeXD4JbpqY qTLQ== X-Gm-Message-State: AFeK/H2JRQ7FZO/ybeILCxI3AQO6GQBtHC6SWeaT1XyKHITeQOQ1hxZ+In0JqXnxwiJgSq/v X-Received: by 10.28.220.212 with SMTP id t203mr15684195wmg.62.1491321804843; Tue, 04 Apr 2017 09:03:24 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id z88sm19686465wrb.1.2017.04.04.09.03.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 09:03:24 -0700 (PDT) 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 Precedence: bulk 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(-) -- 2.9.3 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();