From: Zhang Qilong Date: Tue, 27 Oct 2020 13:49:01 +0000 (+0800) Subject: ACPI: NFIT: Fix comparison to '-ENXIO' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=85f971b65a692b68181438e099b946cc06ed499b;p=linux.git ACPI: NFIT: Fix comparison to '-ENXIO' 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 --- diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 756227837b3b4..3a3c209ed3d36 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);