diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2020-10-27 21:49:01 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-10 12:36:00 +0100 |
commit | a52cdf61125b2189a8e1d85d1e61d654f7fe5d4d (patch) | |
tree | c64edeb7d1a7a6f296bb9d2b336d6ba9311b2f4f | |
parent | 6eecfcbcde431904e5837d285e9e99b5a5eac02c (diff) | |
download | linux-stable-a52cdf61125b2189a8e1d85d1e61d654f7fe5d4d.tar.gz linux-stable-a52cdf61125b2189a8e1d85d1e61d654f7fe5d4d.tar.bz2 linux-stable-a52cdf61125b2189a8e1d85d1e61d654f7fe5d4d.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index dd4c7289610e..cb88f3b43a94 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); |