From patchwork Mon Nov 9 12:55:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 322769 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 31EB8C2D0A3 for ; Mon, 9 Nov 2020 13:10:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF47C20789 for ; Mon, 9 Nov 2020 13:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927427; bh=OCysreUBOh/I7tKWLx+Ybyv5pIlteOzq4petGN+IfsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QA02QTp6uwSx3oRhjBIBRGrSJrcB8IcmoKDpOX8guxAgCbwba5L2dGBg5UuB/pWNE nb0JcakCntyueeoOYC4uaG31bY0EM7Sj/BL8uKxDaoLnJn8C4uIojoBsYh2jO+dSGe H1WQoggjcTBoM3uKFN1BFpC8YGwaMDI35fGlc5tI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730807AbgKINKZ (ORCPT ); Mon, 9 Nov 2020 08:10:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:35656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731331AbgKINKY (ORCPT ); Mon, 9 Nov 2020 08:10:24 -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 3A0F520867; Mon, 9 Nov 2020 13:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927423; bh=OCysreUBOh/I7tKWLx+Ybyv5pIlteOzq4petGN+IfsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CVQUEOB82gRhZxBNMREUTLC7E8DNo9sR37+pcBBaX/wRmog/9GpY2KCUB/eQClqcy i5jSm2D7InpXnHc+amp3xa+WmOjm0E1hXlcTB8qI4eiyQKOWdKmfLFIVudCmyMe6xf CA3ocYa6SxX62e5/Ws66anxUm5srExgrEisK4DaY= 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 4.19 54/71] ACPI: NFIT: Fix comparison to -ENXIO Date: Mon, 9 Nov 2020 13:55:48 +0100 Message-Id: <20201109125022.442750337@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125019.906191744@linuxfoundation.org> References: <20201109125019.906191744@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 dd4c7289610ec..cb88f3b43a940 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1535,7 +1535,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);