From: Zhang Qilong Date: Tue, 27 Oct 2020 13:49:01 +0000 (+0800) Subject: ACPI: NFIT: Fix comparison to '-ENXIO' X-Git-Tag: v4.9.242~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2da887bc7534077961ec5248ab36b3dbb1505278;p=platform%2Fkernel%2Flinux-amlogic.git 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 Reviewed-by: Pankaj Gupta Reviewed-by: Vishal Verma [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 31a07609f7a2..b7fd8e00b346 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1219,7 +1219,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);