diff mbox

[2/2] hp-wmi - properly handle errors returned by wmi_install_notify_handler()

Message ID 20091229083420.13097.75563.stgit@localhost.localdomain (mailing list archive)
State RFC, archived
Headers show

Commit Message

Dmitry Torokhov Dec. 29, 2009, 8:34 a.m. UTC
None
diff mbox

Patch

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();
 	}