ACPI: NFIT: Fix comparison to '-ENXIO'
authorZhang Qilong <zhangqilong3@huawei.com>
Tue, 27 Oct 2020 13:49:01 +0000 (21:49 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Oct 2020 18:34:56 +0000 (19:34 +0100)
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>
drivers/acpi/nfit/core.c

index 756227837b3b4876d14c447ca7fdb9194a6193b2..3a3c209ed3d36a6111be6bf5804bb6a4fe3024d1 100644 (file)
@@ -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);