From patchwork Wed Dec 30 06:21:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 70202 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBU6MNJ1007168 for ; Wed, 30 Dec 2009 06:22:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbZL3GVx (ORCPT ); Wed, 30 Dec 2009 01:21:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752354AbZL3GVv (ORCPT ); Wed, 30 Dec 2009 01:21:51 -0500 Received: from vms173003pub.verizon.net ([206.46.173.3]:55393 "EHLO vms173003pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbZL3GVs (ORCPT ); Wed, 30 Dec 2009 01:21:48 -0500 Received: from localhost.localdomain ([74.104.151.18]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KVG008RACC8OMHH@vms173003.mailsrvcs.net>; Wed, 30 Dec 2009 00:21:46 -0600 (CST) Received: from localhost.localdomain (d975xbx2 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id nBU6LhWo032713; Wed, 30 Dec 2009 01:21:43 -0500 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) with ESMTP id nBU6Lgkw032708; Wed, 30 Dec 2009 01:21:42 -0500 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Wed, 30 Dec 2009 01:21:42 -0500 (EST) From: Len Brown X-X-Sender: lenb@localhost.localdomain To: Paul Rolland Cc: Ingo Molnar , Linus Torvalds , Dmitry Torokhov , Matthew Garrett , Linux Kernel Mailing List , rol@witbe.net, linux-acpi@vger.kernel.org, werner Subject: [PATCH] dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21, it should follow 0/-E convention In-reply-to: <20091228175301.4e89aa65@tux.DEF.witbe.net> Message-id: References: <20091225102731.GA25513@elte.hu> <20091228094444.GG24690@elte.hu> <20091228120125.GA10911@elte.hu> <20091228160212.1f70d825@tux.DEF.witbe.net> <20091228175301.4e89aa65@tux.DEF.witbe.net> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 916ccb2..4c7e702 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -323,6 +323,7 @@ static int __init dell_wmi_input_setup(void) static int __init dell_wmi_init(void) { int err; + acpi_status status; if (wmi_has_guid(DELL_EVENT_GUID)) { printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); @@ -336,14 +337,14 @@ static int __init dell_wmi_init(void) if (err) return err; - err = wmi_install_notify_handler(DELL_EVENT_GUID, + status = wmi_install_notify_handler(DELL_EVENT_GUID, dell_wmi_notify, NULL); - if (err) { + if (ACPI_FAILURE(status)) { input_unregister_device(dell_wmi_input_dev); printk(KERN_ERR "dell-wmi: Unable to register notify handler - %d\n", - err); - return err; + status); + return -ENODEV; } return 0;