From: "Verma, Vishal L" Subject: Re: [PATCH] ACPI: nfit: return -ENODEV if fail to find NFIT at startup Date: Fri, 3 Aug 2018 17:11:41 +0000 Message-ID: <1533316299.8557.71.camel@intel.com> References: <1533289198-11400-1-git-send-email-oceanhehy@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1533289198-11400-1-git-send-email-oceanhehy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Content-Language: en-US Content-ID: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: "Williams, Dan J" , "ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org" , "oceanhehy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , "Jiang, Dave" , "lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org" Cc: "linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "hehy1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org" List-Id: linux-acpi@vger.kernel.org On Fri, 2018-08-03 at 05:39 -0400, Ocean He wrote: > From: Ocean He > > 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 > --- > 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; Hm, the comment directly above this says this is ok.. Has this caused any problems in practice? > } > > rc = devm_add_action_or_reset(dev, acpi_nfit_put_table, > tbl);