[PATCH 2/3] hp-wmi: Fix mixing up of and/or directive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This should have been an "and". Additionally checking for !obj
is even better.

Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
CC: linux-acpi@xxxxxxxxxxxxxx
CC: platform-driver-x86@xxxxxxxxxxxxxxx
CC: mjg@xxxxxxxxxx
---
 drivers/platform/x86/hp-wmi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 4c30dd3..f324c55 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -470,7 +470,9 @@ static void hp_wmi_notify(u32 value, void *context)
 
 	obj = (union acpi_object *)response.pointer;
 
-	if (obj || obj->type != ACPI_TYPE_BUFFER) {
+	if (!obj)
+		return;
+	if (obj->type != ACPI_TYPE_BUFFER) {
 		printk(KERN_INFO "hp-wmi: Unknown response received %d\n",
 		       obj->type);
 		kfree(obj);
-- 
1.6.3

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux