summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2020-10-27 21:49:01 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-10 10:29:06 +0100
commitc02d3dece1393bca8cdfe566989f64599178a18f (patch)
tree239abd49ab0de0846e7a9a06b8896e17a2df3c17
parent25b349b4d8229209266f5dd87744bafad2306bbc (diff)
downloadlinux-stable-c02d3dece1393bca8cdfe566989f64599178a18f.tar.gz
linux-stable-c02d3dece1393bca8cdfe566989f64599178a18f.tar.bz2
linux-stable-c02d3dece1393bca8cdfe566989f64599178a18f.zip
ACPI: NFIT: Fix comparison to '-ENXIO'
[ Upstream commit 85f971b65a692b68181438e099b946cc06ed499b ] Initial value of rc is '-ENXIO', and we should use the initial value to check it. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com> Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/acpi/nfit/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 68205002f561..20fd197ef74c 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -1273,7 +1273,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);