Message ID | 20201027134901.65045-1-zhangqilong3@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 85f971b65a692b68181438e099b946cc06ed499b |
Headers | show |
Series | [-next] ACPI: NFIT: Fix judgment of rc is '-ENXIO' | expand |
> Initial value of rc is '-ENXIO', and we should > use the initial value to check it. > > Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> > --- > drivers/acpi/nfit/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c > index 756227837b3b..3a3c209ed3d3 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); Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
On Tue, 2020-10-27 at 21:49 +0800, Zhang Qilong wrote: > Initial value of rc is '-ENXIO', and we should > use the initial value to check it. > > Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> > --- > drivers/acpi/nfit/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Looks good, Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> > > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c > index 756227837b3b..3a3c209ed3d3 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);
On Tue, Oct 27, 2020 at 2:38 PM Zhang Qilong <zhangqilong3@huawei.com> wrote: > > Initial value of rc is '-ENXIO', and we should > use the initial value to check it. > > Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> > --- > drivers/acpi/nfit/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c > index 756227837b3b..3a3c209ed3d3 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); > -- Applied as 5.10-rc material with a subject edit, thanks!
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 756227837b3b..3a3c209ed3d3 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);
Initial value of rc is '-ENXIO', and we should use the initial value to check it. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> --- drivers/acpi/nfit/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)