From: Len Brown <lenb@kernel.org>
To: Paul Rolland <rol@as2917.net>
Cc: Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Matthew Garrett <mjg@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
rol@witbe.net, linux-acpi@vger.kernel.org,
werner <w.landgraf@ru.ru>
Subject: [PATCH] dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21, it should follow 0/-E convention
Date: Wed, 30 Dec 2009 01:21:42 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.0912300119190.15839@localhost.localdomain> (raw)
In-Reply-To: <20091228175301.4e89aa65@tux.DEF.witbe.net>
From: Len Brown <len.brown@intel.com>
wmi_install_notify_handler() returns an acpi_error,
but dell_wmi_init() needs return a -errno style error.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/platform/x86/dell-wmi.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
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;
--
1.6.6.rc4.11.g129a5
prev parent reply other threads:[~2009-12-30 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.2.00.0912241350510.11961@localhost.localdomain>
[not found] ` <20091225102731.GA25513@elte.hu>
[not found] ` <alpine.LFD.2.00.0912261504460.4089@localhost.localdomain>
[not found] ` <alpine.LFD.2.00.0912262316530.14053@localhost.localdomain>
[not found] ` <20091228094444.GG24690@elte.hu>
[not found] ` <20091228120125.GA10911@elte.hu>
[not found] ` <20091228160212.1f70d825@tux.DEF.witbe.net>
[not found] ` <20091228175301.4e89aa65@tux.DEF.witbe.net>
2009-12-30 6:19 ` [PATCH] wmi: check find_guid() return value to prevent oops Len Brown
2009-12-30 6:21 ` Len Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0912300119190.15839@localhost.localdomain \
--to=lenb@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mjg@redhat.com \
--cc=rol@as2917.net \
--cc=rol@witbe.net \
--cc=torvalds@linux-foundation.org \
--cc=w.landgraf@ru.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox