Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2498647imm; Mon, 28 May 2018 09:13:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpSlaqydEHkfdR/MPQ36MrdB01myhKb8+p1XuLeNSXvztuCCohH5Be3CD50Hx8ye0ZU8VRK X-Received: by 2002:a62:6883:: with SMTP id d125-v6mr14151405pfc.26.1527523987251; Mon, 28 May 2018 09:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527523987; cv=none; d=google.com; s=arc-20160816; b=CcewyxamRFC1+dUIHHeudBnYoIDxT0D1UnQ4QOhJutyrZqOK20oasq86jCws0BdFBB ePqcCE3OQ7lzxXMt/xpxlTjW14hCAZiFtKrrckvK1bf6dyzq5x5n4bVSLWi3HCS7kdWN SimwxWyHs65bCfOPLq6ZRdepp3ldNiwu1KdfchkFOvtULslMDeirSA7H4o546ZJz4RA3 anLEfkQC2MB9H8ZxAxi66Cri26aOt+RR3I7GpYt2HAtg0/Wr+nhUcsOXOU58bUGMclK5 aXsC/TRcraNieeG5QJ4uzboSoqn1a7ngGZWhiyTHnARHdEypxmUvprMxy27xISaZ40fE rejQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Gv+lJ/+p6aS1mJv539zCgjjyjuZ3jAzy/s33pio/cVA=; b=EDXlCLagRS0iox/k9Xr8hzfkBWDgxT3jUx4WF2adRuaGCYQhuyzfFjcsae3zlJ4zgD UDlpc8Xj1gwf3pqEAYs2+2wTwrjbAVuP9p52sNqsroY9GJANqL2v2PBxnR1rHYBHfNFc mOzSSjSUI8iz0noz3bLq4hAfOjFgqCoPpgWpJG6cqW8E+SvnpyNuIx8Z85K1bUo/2tQJ soDcIEBW+uhv3V/aN+w/go0Sn6ctvA+GMA44qp+6otsWfwHnymtc+0nXEC18ltIkqB/d 4ocUfyjfjsDKxGuJAYFF5C8x+R2ZrYBCNJ7/qYvG/0j79UxuY6ELOSTltnPBJcCfWXQQ Xv0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ha2q7H3D; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2-v6si31559278plk.433.2018.05.28.09.12.52; Mon, 28 May 2018 09:13:07 -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=@kernel.org header.s=default header.b=ha2q7H3D; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939740AbeE1QMV (ORCPT + 99 others); Mon, 28 May 2018 12:12:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:33414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936557AbeE1KNd (ORCPT ); Mon, 28 May 2018 06:13:33 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 458A620843; Mon, 28 May 2018 10:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502412; bh=hNP62IvOnDhjvuQH88hk14ArcRibGl7Z5NhuE91HVCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ha2q7H3DSv0fL4/A8wk7Q/DImpht38FmuSIgVppcuWgrs8MWwHAPb6gY0polJSCiE 7WzluYg8QLTurRvUtBpCrG+9kKp1JKdh0XZuoo2jzjPW1OscjRjDaa03ZCyQve56u5 0ARY400vHAtrt/7O81Tpa2JNawggOefB+j3ZqMGQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Erik Schmauss , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 3.18 144/185] ACPICA: Events: add a return on failure from acpi_hw_register_read Date: Mon, 28 May 2018 12:03:05 +0200 Message-Id: <20180528100108.141099825@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Erik Schmauss [ Upstream commit b4c0de312613ca676db5bd7e696a44b56795612a ] This ensures that acpi_ev_fixed_event_detect() does not use fixed_status and and fixed_enable as uninitialized variables. Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/acpica/evevent.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/acpi/acpica/evevent.c +++ b/drivers/acpi/acpica/evevent.c @@ -204,6 +204,7 @@ u32 acpi_ev_fixed_event_detect(void) u32 fixed_status; u32 fixed_enable; u32 i; + acpi_status status; ACPI_FUNCTION_NAME(ev_fixed_event_detect); @@ -211,8 +212,12 @@ u32 acpi_ev_fixed_event_detect(void) * Read the fixed feature status and enable registers, as all the cases * depend on their values. Ignore errors here. */ - (void)acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS, &fixed_status); - (void)acpi_hw_register_read(ACPI_REGISTER_PM1_ENABLE, &fixed_enable); + status = acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS, &fixed_status); + status |= + acpi_hw_register_read(ACPI_REGISTER_PM1_ENABLE, &fixed_enable); + if (ACPI_FAILURE(status)) { + return (int_status); + } ACPI_DEBUG_PRINT((ACPI_DB_INTERRUPTS, "Fixed Event Block: Enable %08X Status %08X\n",