From patchwork Tue Dec 29 08:34:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 70089 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 nBT8YT6S029113 for ; Tue, 29 Dec 2009 08:34:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373AbZL2Ie2 (ORCPT ); Tue, 29 Dec 2009 03:34:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751820AbZL2Ie2 (ORCPT ); Tue, 29 Dec 2009 03:34:28 -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 S1751373AbZL2Ie1 (ORCPT ); Tue, 29 Dec 2009 03:34:27 -0500 Received: by mail-pz0-f171.google.com with SMTP id 1so3332698pzk.33 for ; Tue, 29 Dec 2009 00:34:27 -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:in-reply-to:references:user-agent:mime-version :content-type:content-transfer-encoding; bh=BaUGipmPoW8+O6fBb4MvvsPK017x1lljPFlSYKWpzBc=; b=bl9mUR3/qPUghCi1kSE1iHnnFSFzjyr6p/FikW8OFssnB6DB9GwoLJHjdV5u07cBoz SLY/+4untHMEzH9oF13Lr0pgWlfL0ZpLS9nE/Fa24KSUvOG5w3Z25cixPq50H2ZUsrrp 9HAz0JpD6M2LNSgj7oqFcuQfgvaaeeSmDOWQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=iSDqfhFX6cZOpHY4rp6xCC221dTvCVbkz10FeGogv7Nyn2HK3cz7xJ2vf+f7vDQx9Q wQjCmmVkrP8NsdCv17CNFFNE11YJ6ZvMp3DS9WwG6oGd99bU+3okoUdnHCuvjmtk4DJF aa0I8UwLDfTMjibjMclVqHRo+wSwj/FRuc3mg= Received: by 10.143.26.37 with SMTP id d37mr11132183wfj.222.1262075667576; Tue, 29 Dec 2009 00:34:27 -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 23sm12519106pzk.12.2009.12.29.00.34.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Dec 2009 00:34:26 -0800 (PST) From: Dmitry Torokhov Subject: [PATCH 2/2] hp-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:25 -0800 Message-ID: <20091229083420.13097.75563.stgit@localhost.localdomain> In-Reply-To: <20091229083226.13097.22110.stgit@localhost.localdomain> References: <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/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 1d8a073..88458f3 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -589,12 +589,13 @@ static int hp_wmi_resume_handler(struct device *device) static int __init hp_wmi_init(void) { + acpi_status status; int err; if (wmi_has_guid(HPWMI_EVENT_GUID)) { - err = wmi_install_notify_handler(HPWMI_EVENT_GUID, - hp_wmi_notify, NULL); - if (!err) + status = wmi_install_notify_handler(HPWMI_EVENT_GUID, + hp_wmi_notify, NULL); + if (ACPI_SUCCESS(status)) hp_wmi_input_setup(); }