From patchwork Tue Dec 29 08:34:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 70088 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 nBT8YLKn029096 for ; Tue, 29 Dec 2009 08:34:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbZL2IeU (ORCPT ); Tue, 29 Dec 2009 03:34:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751373AbZL2IeU (ORCPT ); Tue, 29 Dec 2009 03:34:20 -0500 Received: from mail-pz0-f171.google.com ([209.85.222.171]:35997 "EHLO mail-pz0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbZL2IeT (ORCPT ); Tue, 29 Dec 2009 03:34:19 -0500 Received: by pzk1 with SMTP id 1so3332698pzk.33 for ; Tue, 29 Dec 2009 00:34:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:subject:to:cc:date :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=yox8ba/YIIyK9Ce9s/lHCRLd26n/PPFuvYqctQsT2vE=; b=ineHuzwklSBDRlD729LCy22+NAIEmvWIm1seIyxSDAWYYdMDuq0dpU4FEzuocrC9qU AU4BNj1Gd6hFb0IbEkuh4RanArr9TjZL9pcDZTHgOcqqA4miVDnAvDF8xjAjoW+2tZQz ir3oQO28zm6UK95W5bDo4eoOM3V7/y02V0xCE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:subject:to:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; b=yBAgfMgjFbcFMTX5Wo54aM/MnPdzx3/K15WGrdN1dMFx0NYAiG7b8D6HCBh9nj7/Ja zKVAml/XlQ3XnNfzW5AA2H6uM4z8kH5H6mGFx1jOZwLF5qdF+5gzbSNi8UGxUYwnzi5x 6Ts7117r42yRHVrU2yX86q+O1BU0DwONzJ8z8= Received: by 10.142.152.40 with SMTP id z40mr2633050wfd.334.1262075658142; Tue, 29 Dec 2009 00:34:18 -0800 (PST) Received: from mailhub.coreip.homeip.net (c-24-6-153-137.hsd1.ca.comcast.net [24.6.153.137]) by mx.google.com with ESMTPS id 22sm12480783pzk.6.2009.12.29.00.34.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Dec 2009 00:34:17 -0800 (PST) From: Dmitry Torokhov Subject: [PATCH 1/2] dell-wmi - properly handle errors returned by wmi_install_notify_handler() To: Len Brown , Matthew Garrett Cc: linux-acpi@vger.kernel.org, Paul Rolland Date: Tue, 29 Dec 2009 00:34:14 -0800 Message-ID: <20091229083226.13097.22110.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 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 ff67a78..79bb1f1 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -265,6 +265,7 @@ static void __init find_hk_type(const struct dmi_header *dm, void *dummy) static int __init dell_wmi_init(void) { + acpi_status status; int err; if (!wmi_has_guid(DELL_EVENT_GUID)) { @@ -279,12 +280,12 @@ static int __init dell_wmi_init(void) if (err) return err; - err = wmi_install_notify_handler(DELL_EVENT_GUID, - dell_wmi_notify, NULL); - if (err) { + status = wmi_install_notify_handler(DELL_EVENT_GUID, + dell_wmi_notify, NULL); + if (!ACPI_SUCCESS(status)) { dell_wmi_input_destroy(); - pr_err("Unable to register notify handler - %d\n", err); - return err; + pr_err("Unable to register notify handler - %d\n", status); + return -EIO; } return 0;