From patchwork Fri Sep 12 08:33:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 4892661 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 375559F40F for ; Fri, 12 Sep 2014 08:28:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E300C20295 for ; Fri, 12 Sep 2014 08:33:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94E2A20221 for ; Fri, 12 Sep 2014 08:33:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbaILIdQ (ORCPT ); Fri, 12 Sep 2014 04:33:16 -0400 Received: from mga14.intel.com ([192.55.52.115]:21876 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbaILIdP (ORCPT ); Fri, 12 Sep 2014 04:33:15 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by fmsmga103.fm.intel.com with ESMTP; 12 Sep 2014 01:24:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,511,1406617200"; d="scan'208";a="477075614" Received: from blue.fi.intel.com ([10.237.72.156]) by azsmga001.ch.intel.com with ESMTP; 12 Sep 2014 01:33:10 -0700 Received: by blue.fi.intel.com (Postfix, from userid 1004) id 11BA4E00A3; Fri, 12 Sep 2014 11:33:10 +0300 (EEST) From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Len Brown , linux-acpi@vger.kernel.org, Mika Westerberg Subject: [PATCH] ACPI / scan: Correct error return value of create_modalias() Date: Fri, 12 Sep 2014 11:33:10 +0300 Message-Id: <1410510790-21251-1-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a typo, it should be negative -errno instead. Signed-off-by: Mika Westerberg --- drivers/acpi/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 3bf7764659a4..d5e6ac5042d8 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -130,7 +130,7 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias, list_for_each_entry(id, &acpi_dev->pnp.ids, list) { count = snprintf(&modalias[len], size, "%s:", id->id); if (count < 0) - return EINVAL; + return -EINVAL; if (count >= size) return -ENOMEM; len += count;