From patchwork Tue Oct 18 16:07:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Punit Agrawal X-Patchwork-Id: 9382639 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97A1860839 for ; Tue, 18 Oct 2016 16:08:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88A2029679 for ; Tue, 18 Oct 2016 16:08:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CE4629681; Tue, 18 Oct 2016 16:08:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7259829679 for ; Tue, 18 Oct 2016 16:08:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030447AbcJRQIJ (ORCPT ); Tue, 18 Oct 2016 12:08:09 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:56852 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030371AbcJRQII (ORCPT ); Tue, 18 Oct 2016 12:08:08 -0400 Received: from e105922-lin.cambridge.arm.com (e105922-lin.cambridge.arm.com [10.1.195.25]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with SMTP id u9IG7tZn018877; Tue, 18 Oct 2016 17:07:56 +0100 Received: by e105922-lin.cambridge.arm.com (sSMTP sendmail emulation); Tue, 18 Oct 2016 17:07:55 +0100 From: Punit Agrawal To: linux-acpi@vger.kernel.org, rjw@rjwysocki.net Cc: linux-kernel@vger.kernel.org, tbaicar@codeaurora.org, bp@suse.de, Punit Agrawal , Len Brown Subject: [PATCH] acpi/apei: Fix in-correct return value Date: Tue, 18 Oct 2016 17:07:19 +0100 Message-Id: <20161018160719.31252-1-punit.agrawal@arm.com> X-Mailer: git-send-email 2.9.3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Although ghes_proc tests for error while reading the error status, it always return success (0). Fix this by propagating the return value. Fixes: d334a49113a4a33 ("ACPI, APEI, Generic Hardware Error Source memory error support") Signed-of-by: Punit Agrawal Cc: "Rafael J. Wysocki" Cc: Len Brown Tested-by: Tyler Baicar Reviewed-by: Borislav Petkov --- drivers/acpi/apei/ghes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index f0a029e..0d099a2 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -662,7 +662,7 @@ static int ghes_proc(struct ghes *ghes) ghes_do_proc(ghes, ghes->estatus); out: ghes_clear_estatus(ghes); - return 0; + return rc; } static void ghes_add_timer(struct ghes *ghes)