Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp242213imm; Fri, 3 Aug 2018 02:42:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdTKP9nTnaMRX0bl1duKR8qSSbr8y/Z77i5nG4fTW4JBS1LcAaHu8Oi9+x0pkEdS33T9clJ X-Received: by 2002:a62:ad1:: with SMTP id 78-v6mr3556284pfk.57.1533289337365; Fri, 03 Aug 2018 02:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533289337; cv=none; d=google.com; s=arc-20160816; b=VH4c+WKZRYUfsv0jUnnx0fa+0wDaNjvmdW9u/kSwXJVQa4siSDc+v79vf7l8bLV7Xh 1r8oUjCR5vRkGgw0XygSSHyMlaCZjB/GKPPOJ5n9CJdeLkSJB7r+h1tf5NaqBjNeNcgN JIiKDQ75i0MePX+d6NpzoO8tjH2eqQ9wBThjeu736TO81QI5CP5+W2yzl+2Tj/G54W9n G2t3F7ZBFUW+nGYJ90x64bBQvFHI+xJusix2lX0pCvww747aXn3Q5fGEBTrQArHa+cHE OxjiacI+TufEEC3zRPurPw9g/77wnIf8u+ohmtyQH/9IHhm7+HKTy1bbqRE+pLS6S0gx ZBfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=6IArTodsa9u5fUdvQjsYVOidH/UVn71Z7VpvvMGWhCo=; b=fo3B1WCWj195uTJQu8u3Atuul8pjwpytpQuM4yG+gTeojjOnXITy9G6j65gteoFYnU YwQltOZJL0LmV+LtdqGOXxf+D65Nn7Q4bfzmeDq8gkMwzVESR4tRkxioJWJMH48siIbi Uu+zAidGXhFbVIzET1N3Y3vOvapKi6+jygev44/WI04nPZLLW/xlDSCG0JqCRbxvULxQ wkPorRHb7WFn3DHLnSgnbcQaIg+bG9C3iUbP790S9iWRMedTQLhLv4IVIsY+LmSRw2Sg a1DwD19XX8IZ4/tuTQ5eztSANIrZYeHdBu6B7SsS6Pq29ThJXl3Lv6uH4UfaX2iVkSVZ zZwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=stHA6wXF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si3900758pgh.50.2018.08.03.02.42.02; Fri, 03 Aug 2018 02:42:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=stHA6wXF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732357AbeHCLgo (ORCPT + 99 others); Fri, 3 Aug 2018 07:36:44 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:44175 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728450AbeHCLgo (ORCPT ); Fri, 3 Aug 2018 07:36:44 -0400 Received: by mail-qt0-f195.google.com with SMTP id b15-v6so5416993qtp.11; Fri, 03 Aug 2018 02:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6IArTodsa9u5fUdvQjsYVOidH/UVn71Z7VpvvMGWhCo=; b=stHA6wXFCRD85eNCBibPyHUbBv53YdD/7e736LHD3kmXYymE26k8vtykiIxokEzoIJ X7T5eveO1QwnzlXS9nltIZF08sSJqnFMMaCIq1DIrW9tZUKhCC4QH9qRVGOcsN7H+IRF JAyBwQMq5uLRgedhVuXPoR1KrQ2rJar6nXx1Ss7ZU/uM2ICF7QnJNwvOCfUGfE8ICQKt pgGj0e22aAB/mxI+SJZo0VJac6IdeFN5SBUg1qSTtpgII5DOZhTQg8svP8/gi15uBRiU CEICyZqPukrNy60KHa26egu9S+7/Zh5N2/u3feo7A/rdPr9FMxunuFP+4b2Pu+yccxuG rkHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6IArTodsa9u5fUdvQjsYVOidH/UVn71Z7VpvvMGWhCo=; b=uoORrTD1ZU7breGroiqa52Guu4KOX/Y0kvfnHzL2GtBe/JSSXpxxQprnsb1pxLuC0z eA0HD9P04e5lvUBGJBYVGY80uv24/FXeLP4UaNM976o9Glq+/j5hB8zerRjMfoRGhaXF DW8o3t3HsAOwNbFsyj4UqjnqQ2cH6ebW44JGpBXH9c+RXOTvs1gE7ChrGZJHR6/yUWsi kgELcL2gSsbPRywH5RQJrHy2gLTPhz3aiy2fO8JWX9k7MLjbNN1xboG4Cyygtan4oH/9 OVNsGPDGr5US95gWuFVaxbCntGbe0TXiFdgen8srvcd0FoiXtnlj7HPxQbgPfsf13Ryr 3/Eg== X-Gm-Message-State: AOUpUlGvm24U6+9pkeivrQ0FlhWD4O2Mob3i3hFOyUP3+LnbvSGHRi+a dJH07L67KfY9T0KYBVwVwmM= X-Received: by 2002:ac8:32a1:: with SMTP id z30-v6mr1537653qta.323.1533289273832; Fri, 03 Aug 2018 02:41:13 -0700 (PDT) Received: from localhost.localdomain ([45.56.155.220]) by smtp.gmail.com with ESMTPSA id q51-v6sm4399482qta.92.2018.08.03.02.41.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 02:41:13 -0700 (PDT) From: Ocean He To: dan.j.williams@intel.com, ross.zwisler@linux.intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, rjw@rjwysocki.net, lenb@kernel.org Cc: linux-nvdimm@lists.01.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Ocean He Subject: [PATCH] ACPI: nfit: return -ENODEV if fail to find NFIT at startup Date: Fri, 3 Aug 2018 05:39:58 -0400 Message-Id: <1533289198-11400-1-git-send-email-oceanhehy@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } rc = devm_add_action_or_reset(dev, acpi_nfit_put_table, tbl); -- 1.8.3.1