[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1533289198-11400-1-git-send-email-oceanhehy@gmail.com>
Date: Fri, 3 Aug 2018 05:39:58 -0400
From: Ocean He <oceanhehy@...il.com>
To: dan.j.williams@...el.com, ross.zwisler@...ux.intel.com,
vishal.l.verma@...el.com, dave.jiang@...el.com, rjw@...ysocki.net,
lenb@...nel.org
Cc: linux-nvdimm@...ts.01.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, Ocean He <hehy1@...ovo.com>
Subject: [PATCH] ACPI: nfit: return -ENODEV if fail to find NFIT at startup
From: Ocean He <hehy1@...ovo.com>
In the beginning of acpi_nfit_add, if fail to find NFIT table then should
return -ENODEV, instead of 0.
Signed-off-by: Ocean He <hehy1@...ovo.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 7c47900..1790d7c 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -3355,7 +3355,7 @@ static int acpi_nfit_add(struct acpi_device *adev)
if (ACPI_FAILURE(status)) {
/* This is ok, we could have an nvdimm hotplugged later */
dev_dbg(dev, "failed to find NFIT at startup\n");
- return 0;
+ return -ENODEV;
}
rc = devm_add_action_or_reset(dev, acpi_nfit_put_table, tbl);
--
1.8.3.1
Powered by blists - more mailing lists