From patchwork Fri Aug 3 09:39:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ocean He X-Patchwork-Id: 10554895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE2D815A6 for ; Fri, 3 Aug 2018 09:41:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC74B2C261 for ; Fri, 3 Aug 2018 09:41:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0D5F2C28D; Fri, 3 Aug 2018 09:41:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C38B2C261 for ; Fri, 3 Aug 2018 09:41:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C1A85210D7F4A; Fri, 3 Aug 2018 02:41:15 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400d:c0d::242; helo=mail-qt0-x242.google.com; envelope-from=oceanhehy@gmail.com; receiver=linux-nvdimm@lists.01.org Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DA2F8210C5138 for ; Fri, 3 Aug 2018 02:41:14 -0700 (PDT) Received: by mail-qt0-x242.google.com with SMTP id n6-v6so5459292qtl.4 for ; 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=rBInv7fNpo94rp2cUjpH6ZgsmkVcvA/BkqXecOiDx/lsUYTDtHOP9jiRm/TTf7GKVu gF5L9Khmf8afW03JeBH7Z8/kraXVQGVaEch9YYyC8kXneeL+XLU9SU+4TgXF1Vf936PG dZ+ZcdVytCBPdiv9JecBoGTGx0wRzWK3Q6Mj5UNypyeBAgf7KjlMhD4vjyevchAuFRO+ bCbt1e7PMd+2BFUXWQtlmh0mtu/r4brcdm6SoF8n3rgGsb8KKPD4ubpoCVV0gVuosb/p 8gyQe/CYaysh7dRTtYgwjVczoH7sjFayMVYTfe0QbYVwcHCxDbsvhmHYiBNkaBwE5zxo V+vQ== X-Gm-Message-State: AOUpUlFwstYMH7MGA0PZMjo7s/x6CPgpuZCD9YOxF/ZN8ilcw8MPkTq6 ZL4r8H7s8orXRYcSebOG9gk= X-Google-Smtp-Source: AAOMgpc7bRNAEFqkW37G5TuY8A/7NwOQUj0UMzdyqR5ZWOHrbmJ3tAKvH6+08vqmHcBoNdYZryM/pA== 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 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 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-acpi@vger.kernel.org, Ocean He , linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Johannes Thumshirn --- 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);