From patchwork Mon Nov 9 12:56:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 322705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15460C2D0A3 for ; Mon, 9 Nov 2020 13:22:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B93B22076E for ; Mon, 9 Nov 2020 13:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604928171; bh=Y4pk0+NtOTsiLWykNqOh9dUwM35ghrHdAdWuyBg1o/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lakKf6c/KJg28DbLVm77PnktKwfTwXASMYbJDbuWpnI73xKJnKEmwrRVoXRiO1JZM 6lyW8yMbbCxyOS/1XKHQZSL+u4P07A4r8J9qEVjxx541TEJMnSfgrAcawWwjojF4Xi Le+RTIaOTRbpgJ8+5lxKTcA6sLN3hpgmCd+fOCxU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732025AbgKINWu (ORCPT ); Mon, 9 Nov 2020 08:22:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:49760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387816AbgKINVu (ORCPT ); Mon, 9 Nov 2020 08:21:50 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 29C712076E; Mon, 9 Nov 2020 13:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604928109; bh=Y4pk0+NtOTsiLWykNqOh9dUwM35ghrHdAdWuyBg1o/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zDV9OYNdjFwx2mlZYOjVspJhA1Viy1vLihyRqYa6YaJh9KyuWvAIj8gUlZ7nHUNEH fwW2RCUKFW8mzJSQLX9tbAm4ttTwhciz6mpPRTT84RqYiheiyWAc1MiKQxskeC0mvN iLWsHtiPaNXNW56V4kAgB3Mp2iebJUqvCZfPYO5o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Qilong , Pankaj Gupta , Vishal Verma , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.9 100/133] ACPI: NFIT: Fix comparison to -ENXIO Date: Mon, 9 Nov 2020 13:56:02 +0100 Message-Id: <20201109125035.499160785@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125030.706496283@linuxfoundation.org> References: <20201109125030.706496283@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhang Qilong [ Upstream commit 85f971b65a692b68181438e099b946cc06ed499b ] Initial value of rc is '-ENXIO', and we should use the initial value to check it. Signed-off-by: Zhang Qilong Reviewed-by: Pankaj Gupta Reviewed-by: Vishal Verma [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/nfit/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 26dd208a0d636..103ae7401f957 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1564,7 +1564,7 @@ static ssize_t format1_show(struct device *dev, le16_to_cpu(nfit_dcr->dcr->code)); break; } - if (rc != ENXIO) + if (rc != -ENXIO) break; } mutex_unlock(&acpi_desc->init_mutex);