From patchwork Thu Dec 5 15:42:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 22079 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A8534202E0 for ; Thu, 5 Dec 2013 15:42:53 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id o15sf19147542qap.6 for ; Thu, 05 Dec 2013 07:42:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Xf9xiQJReOhHVsovBuf9qXUWkchmYxx71yPRIAnUZZU=; b=dTgcObJgdY6OV71JKP40z4JWiMtr2wmebxgO44rY1i4HGHgoN1gnY0QXDmdOx5j1ZC cTJ3yLORE2evZTD+nQmu1Yi8Hz0+BrcpVfRmF3SNJeLDZLMx6lTRVNp+Jp+4qSBD8ML+ DABkRhEwULhN8zKHl4ePfMIvFhauSxid0yLO3rfeoaN8OVAZUTxBXo7fqsVbZi0av0PN BbEeWOaGV8mksxl9RDeySAiK+Df7XqyYYLj0JO28Mhnz9roqy9VaHo5b7YBoYA0+6Gf4 c8UvZ0qV6a9Qf+AJCh6OGPuqBvsnyf2+Ifxc1pIwLYV6hkwgZtSbb36mZ+p/GBv1O7Ww PAuQ== X-Gm-Message-State: ALoCoQnJWqCW6RpwPyE9mLSR2qwL/qdw7Ltvjh5hkz2AyMeO/ZvDJjfzEypthG4It3Kg/akRrX1Y X-Received: by 10.52.229.41 with SMTP id sn9mr16487426vdc.6.1386258173358; Thu, 05 Dec 2013 07:42:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.105 with SMTP id k9ls751020qen.96.gmail; Thu, 05 Dec 2013 07:42:53 -0800 (PST) X-Received: by 10.58.202.65 with SMTP id kg1mr1315319vec.59.1386258173238; Thu, 05 Dec 2013 07:42:53 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id sx7si69774vdc.42.2013.12.05.07.42.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:42:53 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so14143610veb.12 for ; Thu, 05 Dec 2013 07:42:53 -0800 (PST) X-Received: by 10.220.58.1 with SMTP id e1mr64759797vch.0.1386258172939; Thu, 05 Dec 2013 07:42:52 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp24869vcz; Thu, 5 Dec 2013 07:42:52 -0800 (PST) X-Received: by 10.68.227.36 with SMTP id rx4mr52911495pbc.128.1386258172239; Thu, 05 Dec 2013 07:42:52 -0800 (PST) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by mx.google.com with ESMTPS id kn3si58353910pbc.64.2013.12.05.07.42.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:42:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.41 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.160.41; Received: by mail-pb0-f41.google.com with SMTP id jt11so26252574pbb.28 for ; Thu, 05 Dec 2013 07:42:51 -0800 (PST) X-Received: by 10.66.240.4 with SMTP id vw4mr90378766pac.26.1386258171744; Thu, 05 Dec 2013 07:42:51 -0800 (PST) Received: from localhost ([61.148.199.138]) by mx.google.com with ESMTPSA id jn12sm104127376pbd.37.2013.12.05.07.42.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:42:51 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, patches@linaro.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH] ACPI / table: Replace '1' with specific error in return value Date: Thu, 5 Dec 2013 23:42:38 +0800 Message-Id: <1386258158-10056-1-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In commit 7f8f97c3cc (ACPI: acpi_table_parse() now returns success/fail, not count), it return '1' when no table found, replace -ENODEV here to make it more resonable. Fix the same problem in acpi_table_init() too. Signed-off-by: Hanjun Guo --- drivers/acpi/tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index d67a1fe..4ec4425 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -306,7 +306,7 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler) early_acpi_os_unmap_memory(table, tbl_size); return 0; } else - return 1; + return -ENODEV; } /* @@ -351,7 +351,7 @@ int __init acpi_table_init(void) status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); if (ACPI_FAILURE(status)) - return 1; + return -EINVAL; check_multiple_madt(); return 0;